summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* isdn: hisax: Fix test in waitforxfwRoel Kluin2009-11-042-2/+2
| | | | | | | | | | The negation makes it a bool before the comparison and hence it will never be 0x40. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Karsten Keil <isdn@linux-pingi.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* isdn: eicon: Return on errorJiri Slaby2009-11-041-2/+3
| | | | | | | | | | | When diva_strace_read_uint returns an error, return even from process_idi_event, because l2_state is uninitialized. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Karsten Keil <isdn@linux-pingi.de> Acked-by: Armin Schindler <armin@melware.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* isdn: eicon: Use offsetofJiri Slaby2009-11-041-9/+9
| | | | | | | | | | | | | | | | | | Use offsetof instead of explicit implementation. * fixes bug with omitted & like: len = (byte)(((T30_INFO *) 0)->station_id + 20) * avoids compiler warnings with wrong sizes (pointer-to-char cast): len = (byte)(&(((T30_INFO *) 0)->universal_6)); * cleans up the code Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Karsten Keil <isdn@linux-pingi.de> Acked-by: Armin Schindler <armin@melware.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* misdn: Fix reversed 'if' in st_own_ctrlDan Carpenter2009-11-041-1/+1
| | | | | | | | | | | The current code probably returns -EINVAL a lot. Otherwise it would oops. Compile tested only. Found by smatch (http://repo.or.cz/w/smatch.git). Signed-off-by: Dan Carpenter <error27@gmail.com> Cc: Karsten Keil <isdn@linux-pingi.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* isdn: hisax: Fix lock imbalance.Jiri Slaby2009-11-042-0/+2
| | | | | | | | | Add omittted unlocks to 2 functions. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Karsten Keil <Karsten-Keil@t-online.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* DaVinci EMAC: correct param for ISRTonyliu2009-11-041-1/+1
| | | | | | | | | | | | | | | emac_irq is declared as: static irqreturn_t emac_irq(int irq, void *dev_id) { struct net_device *ndev = (struct net_device *)dev_id; struct emac_priv *priv = netdev_priv(ndev); ... Clearly emac_irq() needs "struct net_device *" as "void *dev_id", so correct this. Signed-off-by: Tonyliu <Bo.Liu@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* cdc_ether: additional Ericsson MBM PID's to the whitelistTorgny Johansson2009-11-042-2/+42
| | | | | Signed-off-by: Torgny Johansson <torgny.johansson@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2009-11-038-10/+36
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
| * libertas if_usb: Fix crash on 64-bit machinesDavid Woodhouse2009-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a 64-bit kernel, skb->tail is an offset, not a pointer. The libertas usb driver passes it to usb_fill_bulk_urb() anyway, causing interesting crashes. Fix that by using skb->data instead. This highlights a problem with usb_fill_bulk_urb(). It doesn't notice when dma_map_single() fails and return the error to its caller as it should. In fact it _can't_ currently return the error, since it returns void. So this problem was showing up only at unmap time, after we'd already suffered memory corruption by doing DMA to a bogus address. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Cc: stable@kernel.org Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: fix misplaced semicolon on rate controlLuis R. Rodriguez2009-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch e43419f9: ath9k: downgrade assert in rc.c for invalid rate downgraded an ASSERT to a WARN_ON() but also misplaced a semicolon at the end of the second check. What this did was force the rate control code to always return the rate even if we should have warned about it. Since this should not have happened anymore anyway this fix isn't critical as the proper rate would have been returned anyway. Cc: stable@kernel.org Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * b43: Fix DMA TX bounce buffer copyingMichael Buesch2009-10-301-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b43 allocates a bouncebuffer, if the supplied TX skb is in an invalid memory range for DMA. However, this is broken in that it fails to copy over some metadata to the new skb. This patch fixes three problems: * Failure to adjust the ieee80211_tx_info pointer to the new buffer. This results in a kmemcheck warning. * Failure to copy the skb cb, which contains ieee80211_tx_info, to the new skb. This results in breakage of various TX-status postprocessing (Rate control). * Failure to transfer the queue mapping. This results in the wrong queue being stopped on saturation and can result in queue overflow. Signed-off-by: Michael Buesch <mb@bu3sch.de> Tested-by: Christian Casteyde <casteyde.christian@free.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * rt73usb.c : more idsXose Vazquez Perez2009-10-301-0/+5
| | | | | | | | | | | | | | | | | | | | stolen from windows inf file(07/17/2009, 1.03.05.0000) Ovislink 0x1b75, 0x7318 MSI 0x0db0, 0x4600 WideTell 0x7167, 0x3840 Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ipw2200: fix oops on missing firmwareZhu Yi2009-10-304-6/+16
| | | | | | | | | | | | | | | | | | | | | | For non-monitor interfaces, the syntax for alloc_ieee80211/free_80211 is wrong. Because alloc_ieee80211 only creates (wiphy_new) a wiphy, but free_80211() does wiphy_unregister() also. This is only correct when the later wiphy_register() is called successfully, which apparently is not the case for your fw doesn't exist one. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | sky2: set carrier off in probeBrandon Philips2009-10-301-0/+2
|/ | | | | | | | | Before bringing up a sky2 interface up ethtool reports "Link detected: yes". Do as ixgbe does and netif_carrier_off() on probe(). Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* pcnet_cs: add cis of PreMax PE-200 ethernet pcmcia cardKen Kawasaki2009-10-302-5/+5
| | | | | | | | | | | | pcnet_cs,serial_cs: add cis of PreMax ethernet pcmcia card, and some Sierra Wireless serial card(AC555, AC7xx, AC8xx). use PROD_ID for AC7xx, because MANF_ID of AC7xx and AC8xx are the same. Signed-off-by: Ken Kawasaki <ken_kawasaki@spring.nifty.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8169: Fix card drop incoming VLAN tagged MTU byte large jumbo framesRaimonds Cicans2009-10-301-1/+1
| | | | | | | | | | | | | r8169 card drop incoming VLAN tagged MTU byte large jumbo frames It looks to compare current and maximal packet sizes hardware use '<' operator, not '<='. Bug introduced by commit fdd7b4c3302c93f6833e338903ea77245eb510b4 ("r8169: fix crash when large packets are received") Signed-off-by: Raimonds Cicans <ray@apollo.lv> Signed-off-by: David S. Miller <davem@davemloft.net>
* ibmtr: possible Read buffer overflow?roel kluin2009-10-301-2/+9
| | | | | | | Prevent read outside array bounds. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* e1000e: rework disable K1 at 1000Mbps for 82577/82578Bruce Allan2009-10-305-28/+190
| | | | | | | | | | | | | This patch reworks a previous workaround (commit 7d3cabbcc) for an issue in hardware where noise on the interconnect between the MAC and PHY could be generated by a lower power mode (K1) at 1000Mbps resulting in bad packets. Disable K1 while at 1000 Mbps but keep it enabled for 10/100Mbps and when the cable is disconnected. The original version of this workaround was found to be incomplete. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* e1000e: config PHY via software after resetsBruce Allan2009-10-302-78/+218
| | | | | | | | | | | | | | On PCH-based (82577/82578) and some ICH8-based parts (82566) there is an issue with the hardware automatically configuring the PHY with contents from the EEPROM after the PHY is reset, so do the configuration by the driver instead. This was already similarly done for some 82566 parts in e1000_phy_hw_reset_ich8lan() but needs to be done after other resets, so move the PHY configuration code to its own function and call after all PHY resets. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* e100: e100_phy_init() isolates selected PHY, causes 10 second boot delayBruce Allan2009-10-301-7/+19
| | | | | | | | | | | | | | | | | A change in how PHYs are electrically isolated caused all PHYs to be isolated followed by reverting that isolation for the selected PHY. Unfortunately, isolating the selected PHY for even a short period of time can result in DHCP negotiation taking more than 10 seconds on certain embedded configurations delaying boot time as reported by Bernhard Kaindl. This patch reverts the change to how PHYs are isolated yet still works around the issue for 82552 needing the selected PHY's BMCR register to be written after the unused PHYs are isolated. This code is moved below the setting of nic->phy ID in order to do the 82552-specific workaround. Cc: Bernhard Kaindl <bernhard.kaindl@gmx.net> Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: usb: dm9601.c can drive a device not supported yet, add support for itJanusz Krzysztofik2009-10-291-0/+4
| | | | | | | | | | | | | | I found that the current version of drivers/net/usb/dm9601.c can be used to successfully drive a low-power, low-cost network adapter with USB ID 0a46:9000, based on a DM9000E chipset. As no device with this ID is yet present in the kernel, I have created a patch that adds support for the device to the dm9601 driver. Created and tested against linux-2.6.32-rc5. Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlge: Fix firmware mailbox command timeout.Ron Mercer2009-10-292-11/+13
| | | | | | | | | The mailbox command process would only process a maximum of 5 unrelated firmware events while waiting for it's command completion status. It should process an unlimited number of events while waiting for a maximum of 5 seconds. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlge: Fix EEH handling.Ron Mercer2009-10-291-26/+52
| | | | | | | | Clean up driver resources without touch the hardware. Add pci save/restore state. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2009-10-296-11/+11
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
| * airo: Reorder tests, check bounds before elementRoel Kluin2009-10-271-3/+2Star
| | | | | | | | | | | | | | Test whether index is within bounds before reading the element Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * libertas spi: fix sparse errorsHolger Schurig2009-10-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following sparse warnings: $ make modules SUBDIRS=drivers/net/wireless/libertas C=1 CF=-D__CHECK_ENDIAN__ make: Entering directory `/usr/src/linux-wl' CHECK drivers/net/wireless/libertas/if_spi.c drivers/net/wireless/libertas/if_spi.c:137:16: warning: incorrect type in initializer (different base types) drivers/net/wireless/libertas/if_spi.c:137:16: expected unsigned short [unsigned] [usertype] reg_out drivers/net/wireless/libertas/if_spi.c:137:16: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:191:16: warning: incorrect type in initializer (different base types) drivers/net/wireless/libertas/if_spi.c:191:16: expected unsigned short [unsigned] [usertype] reg_out drivers/net/wireless/libertas/if_spi.c:191:16: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:256:24: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/libertas/if_spi.c:256:24: expected restricted __le32 const [usertype] *p drivers/net/wireless/libertas/if_spi.c:256:24: got unsigned int *<noident> drivers/net/wireless/libertas/if_spi.c:243:24: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/libertas/if_spi.c:243:24: expected restricted __le16 const [usertype] *p drivers/net/wireless/libertas/if_spi.c:243:24: got unsigned short *<noident> drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types) drivers/net/wireless/libertas/if_spi.c:171:7: expected unsigned short [unsigned] [usertype] buff drivers/net/wireless/libertas/if_spi.c:171:7: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types) drivers/net/wireless/libertas/if_spi.c:171:7: expected unsigned short [unsigned] [usertype] buff drivers/net/wireless/libertas/if_spi.c:171:7: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types) drivers/net/wireless/libertas/if_spi.c:171:7: expected unsigned short [unsigned] [usertype] buff drivers/net/wireless/libertas/if_spi.c:171:7: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types) drivers/net/wireless/libertas/if_spi.c:171:7: expected unsigned short [unsigned] [usertype] buff drivers/net/wireless/libertas/if_spi.c:171:7: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types) drivers/net/wireless/libertas/if_spi.c:171:7: expected unsigned short [unsigned] [usertype] buff drivers/net/wireless/libertas/if_spi.c:171:7: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:243:24: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/libertas/if_spi.c:243:24: expected restricted __le16 const [usertype] *p drivers/net/wireless/libertas/if_spi.c:243:24: got unsigned short *<noident> drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types) drivers/net/wireless/libertas/if_spi.c:171:7: expected unsigned short [unsigned] [usertype] buff drivers/net/wireless/libertas/if_spi.c:171:7: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types) drivers/net/wireless/libertas/if_spi.c:171:7: expected unsigned short [unsigned] [usertype] buff drivers/net/wireless/libertas/if_spi.c:171:7: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types) drivers/net/wireless/libertas/if_spi.c:171:7: expected unsigned short [unsigned] [usertype] buff drivers/net/wireless/libertas/if_spi.c:171:7: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types) drivers/net/wireless/libertas/if_spi.c:171:7: expected unsigned short [unsigned] [usertype] buff drivers/net/wireless/libertas/if_spi.c:171:7: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types) drivers/net/wireless/libertas/if_spi.c:171:7: expected unsigned short [unsigned] [usertype] buff drivers/net/wireless/libertas/if_spi.c:171:7: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types) drivers/net/wireless/libertas/if_spi.c:171:7: expected unsigned short [unsigned] [usertype] buff drivers/net/wireless/libertas/if_spi.c:171:7: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:243:24: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/libertas/if_spi.c:243:24: expected restricted __le16 const [usertype] *p drivers/net/wireless/libertas/if_spi.c:243:24: got unsigned short *<noident> drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types) drivers/net/wireless/libertas/if_spi.c:171:7: expected unsigned short [unsigned] [usertype] buff drivers/net/wireless/libertas/if_spi.c:171:7: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types) drivers/net/wireless/libertas/if_spi.c:171:7: expected unsigned short [unsigned] [usertype] buff drivers/net/wireless/libertas/if_spi.c:171:7: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:243:24: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/libertas/if_spi.c:243:24: expected restricted __le16 const [usertype] *p drivers/net/wireless/libertas/if_spi.c:243:24: got unsigned short *<noident> drivers/net/wireless/libertas/if_spi.c:243:24: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/libertas/if_spi.c:243:24: expected restricted __le16 const [usertype] *p drivers/net/wireless/libertas/if_spi.c:243:24: got unsigned short *<noident> drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types) drivers/net/wireless/libertas/if_spi.c:171:7: expected unsigned short [unsigned] [usertype] buff drivers/net/wireless/libertas/if_spi.c:171:7: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:171:7: warning: incorrect type in assignment (different base types) drivers/net/wireless/libertas/if_spi.c:171:7: expected unsigned short [unsigned] [usertype] buff drivers/net/wireless/libertas/if_spi.c:171:7: got restricted __le16 [usertype] <noident> drivers/net/wireless/libertas/if_spi.c:243:24: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/libertas/if_spi.c:243:24: expected restricted __le16 const [usertype] *p drivers/net/wireless/libertas/if_spi.c:243:24: got unsigned short *<noident> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * b43: add 'struct b43_wl' missing declarationMiguel Boton2009-10-271-0/+1
| | | | | | | | | | | | | | | | 'struct b43_wl' declaration is missing at 'leds.h'. It should be declared to avoid getting some GCC warnings at 'b43_leds_unregister'. Signed-off-by: Miguel Botón <mboton@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * b43: Fix Bugzilla #14181 and the bug from the previous 'fix'Larry Finger2009-10-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "b43: Fix PPC crash in rfkill polling on unload" fixed the bug reported in Bugzilla No. 14181; however, it introduced a new bug. Whenever the radio switch was turned off, it was necessary to unload and reload the driver for it to recognize the switch again. This patch fixes both the original bug in #14181 and the bug introduced by the previous patch. It must be stated, however, that if there is a BCM4306/3 with an rfkill switch (not yet proven), then the driver will need an unload/reload cycle to turn the device back on. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * rt2x00: Fix crypto in TX frame for rt2800usbBenoit PAPILLAULT2009-10-271-1/+1
| | | | | | | | | | | | Signed-off-by: Benoit PAPILLAULT <benoit.papillault@free.fr> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | bonding: fix a race condition in calls to slave MII ioctlsJiri Bohac2009-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In mii monitor mode, bond_check_dev_link() calls the the ioctl handler of slave devices. It stores the ndo_do_ioctl function pointer to a static (!) ioctl variable and later uses it to call the handler with the IOCTL macro. If another thread executes bond_check_dev_link() at the same time (even with a different bond, which none of the locks prevent), a race condition occurs. If the two racing slaves have different drivers, this may result in one driver's ioctl handler being called with a pointer to a net_device controlled with a different driver, resulting in unpredictable breakage. Unless I am overlooking something, the "static" must be a copy'n'paste error (?). Signed-off-by: Jiri Bohac <jbohac@suse.cz> Signed-off-by: David S. Miller <davem@davemloft.net>
* | virtio-net: fix data corruption with OOMMichael S. Tsirkin2009-10-281-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | virtio net used to unlink skbs from send queues on error, but ever since 48925e372f04f5e35fec6269127c62b2c71ab794 we do not do this. This causes guest data corruption and crashes with vhost since net core can requeue the skb or free it without it being taken off the list. This patch fixes this by queueing the skb after successful transmit. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sfc: Set ip_summed correctly for page buffers passed to GROBen Hutchings2009-10-281-3/+6
| | | | | | | | | | | | | | | | | | | | Page buffers containing packets with an incorrect checksum or using a protocol not handled by hardware checksum offload were previously not passed to LRO. The conversion to GRO changed this, but did not set the ip_summed value accordingly. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | cnic: Fix L2CTX_STATUSB_NUM offset in context memory.Michael Chan2009-10-282-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BNX2_L2CTX_STATUSB_NUM definition needs to be changed to match the recent firmware update: commit 078b0735881c7969aaf21469f3577831cddd9f8c bnx2: Update firmware to 5.0.0.j3. Without the fix, bnx2 can crash intermittently in bnx2_rx_int() when iSCSI is enabled. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sh_eth: Add asm/cacheflush.hNobuhiro Iwamatsu2009-10-271-0/+1
| | | | | | | | | | | | | | | | Add include asm/cacheflush.h, because declaration of __flush_purge_region moved to asm/cacheflush.h. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | PPPoE: Fix flush/close races.Michal Ostrowski2009-10-271-61/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Be more careful about the state of pointers during tear-down. The "pppoe_dev" field can only be looked at safely while holding socket locks. This subsequently allows for the flush_lock to be killed. We depend on the PPPOX_CONNECTED state to tell us that that those fields are valid, so whoever clears that state (pppox_unbind_sock()) is responsible for the dev_put() call. We also have to ensure that we delete_item() on all sockets before they are cleaned up. The need for these changes has been exposed by scenarios wherein namespace bindings of ethernet devices change while there are ongoing PPPoE sessions, which resulted in oopses due to unusual socket connection termination paths, exposing these issues. Signed-off-by: Michal Ostrowski <mostrows@gmail.com> Reviewed-by: Cyril Gorcunov <gorcunov@gmail.com> Reported-by: Denys Fedoryschenko <denys@visp.net.lb> Tested-by: Denys Fedoryschenko <denys@visp.net.lb>
* | e1000e: allow for swflag to be held over consecutive PHY accessesBruce Allan2009-10-274-141/+346
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PCH-based parts (82577/82578) and some ICH8-based parts (82566) need to hold the swflag (sw/fw/hw hardware semaphore) over consecutive PHY accesses in order to perform sw-driven PHY configuration during initialization to workaround known hardware issues (see follow-on patch). This patch provides new PHY read/write functions (and function pointers) that will allow accessing the PHY registers assuming the swflag has already been acquired. The actual PHY register access code has moved into helper functions that are called with a flag indicating whether or not the swflag has already been acquired and acquires/releases it if not. The functions called from within the updated PHY access functions had to be updated to assume the swflag was already acquired, and other functions that called those functions were also updated to acquire/release the swflag. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | e1000e: separate mutex usage between NVM and PHY/CSR register for ICHx/PCHBruce Allan2009-10-271-31/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | Accesses to NVM and PHY/CSR registers on ICHx/PCH-based parts are protected from concurrent accesses with a mutex that is acquired when the access is initiated and released when the access has completed. However, the two types of accesses should not be protected by the same mutex because the driver may have to access the NVM while already holding the mutex over several consecutive PHY/CSR accesses which would result in livelock. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | e1000e: 82577/82578 requires a different method to configure LPLUBruce Allan2009-10-271-0/+40
| | | | | | | | | | | | | | | | | | | | Unlike previous ICHx-based parts, the PCH-based parts (82577/82578) require LPLU (Low Power Link Up, or "reverse auto-negotiation") to be configured in the PHY rather than the MAC. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | e1000e: increase swflag acquisition timeout for ICHx/PCHBruce Allan2009-10-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | In some conditions (e.g. when AMT is enabled on the system), it is possible to take an extended period of time to for the driver to acquire the sw/fw/hw hardware semaphore used to protect against concurrent access of a shared resource (e.g. PHY registers). This could cause PHY registers to not get configured properly resulting in link issues. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | e1000e: clear PHY wakeup bit after LCD reset on 82577/82578Bruce Allan2009-10-271-1/+9
| | | | | | | | | | | | | | | | | | | | Performing a dummy read of the PHY Wakeup Control (WUC) register clears the wakeup enable bit set by an PHY reset. If this bit remains set, link problems may occur. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | igbvf: fix memory leak when ring size changed while interface downAlexander Duyck2009-10-271-13/+17
| | | | | | | | | | | | | | | | | | This patch resolves a memory leak which occurs while changing the ring size while the interface is down. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ixgbe: fix memory leak when resizing rings while interface is downAlexander Duyck2009-10-271-9/+13
| | | | | | | | | | | | | | | | | | This patch resolves a memory leak that occurs when you resize the rings via the ethtool -G option while the interface is down. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | igb: fix memory leak when setting ring size while interface is downAlexander Duyck2009-10-271-13/+22
| | | | | | | | | | | | | | | | | | | | | | | | Changing ring sizes while the interface was down was causing a double allocation of the receive and transmit rings. This issue is amplified when there are multiple rings enabled. To prevent this we need to add an additional check which will just update the ring counts when the interface is not up and skip the allocation steps. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | bonding: Modify hash transmit policies to use the packet's source MAC addressJasper Spaans2009-10-241-4/+4
|/ | | | | | | | | | | | Modify bonding hash transmit policies to use the psource MAC address of the packet instead of the MAC address configured for the bonding device. The old sitation conflicts with the documentation. Signed-off-by: Jasper Spaans <spaans@fox-it.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* DM9000: Fix revision ID for DM9000BBen Dooks2009-10-241-1/+1
| | | | | | | | | | | The DM9000B revision ID is 0x1A, not 0x1B as set in the curernt dm9000.h header. Fix bug reported by Paolo Zebelloni. Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Simtec Linux Team <linux@simtec.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* r8169: fix Ethernet Hangup for RTL8110SC rev dSimon Wunderlich2009-10-241-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The 8110SC rev d chip on our board shows a regression which the 8110SB chip did not have. When inbound traffic is overflowing the receive descriptor queue, "holes" in the ring buffer may occur which lead to a hangup until the buffer is filled again. The packets are than completely processed, but the ring remains porous and no packets are processed until the next overflow. Setting the interface down and up can fix the problem temporary from userspace. For some reason we don't know, this behaviour is not occuring if the RxVlan bit for hardware VLAN untagging is set. There is another "Work around for AMD plateform" in the current code which checks the VLAN status word in receive descriptors, but does never come to effect when hardware VLAN support is enabled. We assume that this is a bug in the chip. The following patch fixes the problem. Without the patch we could reproduce the hang within minutes (given other devices also generating lots of interrupts), without we couldn't reproduce within a few days of long term testing. This version contains minor style adjustments and is sent with mutt which will hopefully not destroy the formatting again. Signed-off-by: Bernhard Schmidt <bernhard.schmidt@saxnet.de> Signed-off-by: Simon Wunderlich <simon.wunderlich@saxnet.de> Acked-by: Francois Romieu <romieu@zoreil.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ifb: should not use __dev_get_by_index() without locksEric Dumazet2009-10-231-1/+2
| | | | | | | | At this point (ri_tasklet()), RTNL or dev_base_lock are not held, we must use dev_get_by_index() instead of __dev_get_by_index() Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: au1000_eth: add missing capability.hManuel Lauss2009-10-231-0/+1
| | | | | | | | | | | | | fixes the following build failure: CC drivers/net/au1000_eth.o /drivers/net/au1000_eth.c: In function 'au1000_set_settings': /drivers/net/au1000_eth.c:623: error: implicit declaration of function 'capable' /drivers/net/au1000_eth.c:623: error: 'CAP_NET_ADMIN' undeclared (first use in this function) /drivers/net/au1000_eth.c:623: error: (Each undeclared identifier is reported only once /drivers/net/au1000_eth.c:623: error: for each function it appears in. Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* myri10ge: improve port type reporting in ethtoolBrice Goglin2009-10-231-3/+14
| | | | | | | | | Improve the reporting of myri10ge port type in ethtool, and update for new boards. Signed-off-by: Brice Goglin <brice@myri.com> Signed-off-by: Andrew Gallatin <gallatin@myri.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* e1000e: reset the PHY on 82577/82578 when going to SxBruce Allan2009-10-231-2/+1Star
| | | | | | | | | | | | The PHY on 82577/82578 parts needs a soft reset when transitioning to Sx state in order for the PHY write which disables gigabit speed to take effect. Gigabit speed must be disabled in order for the PHY writes to registers on page 800 (the wakeup control registers) to work as expected otherwise the system might not wake via WoL. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>