summaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2012-09-30Merge branch 'for-davem' of ↵David S. Miller84-2269/+1846
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next John W. Linville says: ==================== Here is another batch of updates intended for 3.7... Highlights include an hci_connect re-write in Bluetooth, HCI/LLC layer separation in NFC, removal of the raw pn544 NFC driver, NFC LLCP raw sockets support, improved IBSS auth frame handling in mac80211, full-MAC AP mode notification support in mac80211, a lot of attention paid to brcmfmac, and the usual level of updates to iwlwifi, ath9k, mwifiex, and rt2x00, and various other updates. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-30be2net: fixup log messagesSathya Perla2-6/+31
Added and modified a few log messages mostly in probe path. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-30be2net: cleanup code related to be_link_status_query()Sathya Perla5-64/+48
1) link_status_query() is always called to query the link-speed (speed after applying qos). When there is no qos setting, link-speed is derived from port-speed. Do all this inside this routine and hide this from the callers. 2) adpater->phy.forced_port_speed is not being set anywhere after being initialized. Get rid of this variable. 3) Ignore async link_speed notifications till the initial value has been fetched from FW. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-30be2net: fix wrong handling of be_setup() failure in be_probe()Sathya Perla1-3/+1
Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-30be2net: remove type argument of be_cmd_mac_addr_query()Sathya Perla3-15/+9
All invocations of this routine use the same type value. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-30tg3: Disable multiple TX rings by default due to hardware flawMichael Chan1-6/+9
Simple round-robin hardware TX scheduling can cause starvation of TX rings with small packets when other TX rings have large TSO or jumbo packets. In the simplest case, consider 2 TCP streams running in opposite directions. The TSO TX traffic will hash to one ring and the ACKs for the incoming data on a different TCP connection will hash to a different TX ring. The hardware fetches one complete TSO packet (up to 64K data) before servicing the other TX ring. When it gets to the other TX ring, it will only fetch one packet (64-byte ACK packet in this case). After that, it will switch back to the 1st ring filled with more TSO packets. Because only one ACK can go out roughly every 500 usec in this case, the incoming data rate becomes very low. Update version to 3.125. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-30tg3: Add support for ethtool -L|-l to get/set the number of rings.Michael Chan2-3/+63
Default remains the same. Reviewed-by: Nithin Nayak Sujir <nsujir@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-30tg3: Refactor tg3_close()Michael Chan1-32/+38
by introducing tg3_stop() that does the opposite of tg3_start(). This function will be useful when adding the support for changing the numbe of rx and tx rings. Reviewed-by: Nithin Nayak Sujir <nsujir@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-30tg3: Refactor tg3_open()Michael Chan1-33/+45
by introducing tg3_start() that handles all initialization steps from IRQ allocation. This function will be needed when adding support for changing the number of rx and tx rings. Reviewed-by: Nithin Nayak Sujir <nsujir@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-30tg3: Separate coalescing setup for rx and txMichael Chan1-29/+45
since the number of rings can be different. Reviewed-by: Nithin Nayak Sujir <nsujir@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-30tg3: Allow number of rx and tx rings to be set independently.Michael Chan2-26/+53
irq_cnt is no longer necessarily equal to the number rx or tx rings. Reviewed-by: Nithin Nayak Sujir <nsujir@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-30tg3: Introduce separate functions to allocate/free RX/TX rings.Michael Chan2-76/+146
This is preparation work to allow the number of RX and TX rings to be configured separately. Reviewed-by: Nithin Nayak Sujir <nsujir@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-28Merge branch 'for-davem' of git://gitorious.org/linux-can/linux-can-nextDavid S. Miller1-3/+0
Marc Kleine-Budde says: ==================== this pull request is for net-next, for the v3.7 release cycle. AnilKumar Ch contributed a fix for a segfault in the c_can driver, which is triggered by an earlier commit [1] in net-next (so no backport is needed). ... [1] 4cdd34b can: c_can: Add runtime PM support to Bosch C_CAN/D_CAN controller ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-28smsc75xx: add wol magic packet supportSteve Glendinning1-14/+174
This patch enables wake from system suspend on magic packet. Patch updated to change BUG_ON to WARN_ON_ONCE. Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-28smsc75xx: enable power saving mode during system suspendSteve Glendinning1-3/+54
This patch instructs the device to enter its lowest power SUSPEND2 state during system suspend. This patch also explicitly wakes the device after resume, which should address reports of the device not automatically coming back after system suspend: Patch updated to change BUG_ON to WARN_ON_ONCE. http://code.google.com/p/chromium-os/issues/detail?id=31871 Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-28smsc75xx: add explicit test that device is READYSteve Glendinning1-0/+23
This patch adds an explicit test that the READY bit is set on the device when attempting to initialize it. If this bit is clear then the device hasn't succesfully started all its clocks, and this patch helps make the resulting logged error more helpful. Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-28smsc95xx: add wol magic packet supportSteve Glendinning2-8/+182
This patch enables wake from system suspend on magic packet. Patch updated to replace BUG_ON with WARN_ON_ONCE and return. Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-28smsc95xx: enable power saving mode during system suspendSteve Glendinning2-2/+32
This patch enables the device to enter its lowest power SUSPEND2 state during system suspend, instead of staying up using full power. Patch updated to not add two pointers to .suspend & .resume. Patch updated to replace BUG_ON with WARN_ON_ONCE and return. Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-28smsc95xx: fix resume when usb device is resetSteve Glendinning1-0/+1
This patch fixes an issue on some systems, where after suspend the link is re-established but the ethernet interface does not resume. Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-28smsc95xx: check return code from control messagesSteve Glendinning1-183/+148
This patch adds additional checks of the values returned by smsc95xx_(read|write)_reg, and wraps their common patterns in macros. Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-28smsc95xx: remove unnecessary variablesSteve Glendinning2-20/+10
Removes unnecessary variables as smsc95xx_write_reg takes its value by parameter. Early versions passed this parameter by reference. Also replace hardcoded interrupt status value with a #define Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-28smsc95xx: sleep before read for lengthy operationsSteve Glendinning1-2/+2
During init, the device reset is unexpected to complete immediately, so sleep before testing the condition rather than after it. Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-28Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller189-950/+1638
Conflicts: drivers/net/team/team.c drivers/net/usb/qmi_wwan.c net/batman-adv/bat_iv_ogm.c net/ipv4/fib_frontend.c net/ipv4/route.c net/l2tp/l2tp_netlink.c The team, fib_frontend, route, and l2tp_netlink conflicts were simply overlapping changes. qmi_wwan and bat_iv_ogm were of the "use HEAD" variety. With help from Antonio Quartulli. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-28Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds7-15/+40
Pull networking fixes from David S Miller: 1) Netfilter xt_limit module can use uninitialized rules, from Jan Engelhardt. 2) Wei Yongjun has found several more spots where error pointers were treated as NULL/non-NULL and vice versa. 3) bnx2x was converted to pci_io{,un}map() but one remaining plain iounmap() got missed. From Neil Horman. 4) Due to a fence-post type error in initialization of inetpeer entries (which is where we store the ICMP rate limiting information), we can erroneously drop ICMPs if the inetpeer was created right around when jiffies wraps. Fix from Nicolas Dichtel. 5) smsc75xx resume fix from Steve Glendinnig. 6) LAN87xx smsc chips need an explicit hardware init, from Marek Vasut. 7) qlcnic uses msleep() with locks held, fix from Narendra K. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: netdev: octeon: fix return value check in octeon_mgmt_init_phy() inetpeer: fix token initialization qlcnic: Fix scheduling while atomic bug bnx2: Clean up remaining iounmap net: phy: smsc: Implement PHY config_init for LAN87xx smsc75xx: fix resume after device reset netdev: pasemi: fix return value check in pasemi_mac_phy_init() team: fix return value check l2tp: fix return value check netfilter: xt_limit: have r->cost != 0 case work
2012-09-28Merge tag 'dm-3.6-fixes' of ↵Linus Torvalds6-78/+209
git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm Pull dm fixes from Alasdair G Kergon: "A few fixes for problems discovered during the 3.6 cycle. Of particular note, are fixes to the thin target's discard support, which I hope is finally working correctly; and fixes for multipath ioctls and device limits when there are no paths." * tag 'dm-3.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm: dm verity: fix overflow check dm thin: fix discard support for data devices dm thin: tidy discard support dm: retain table limits when swapping to new table with no devices dm table: clear add_random unless all devices have it set dm: handle requests beyond end of device instead of using BUG_ON dm mpath: only retry ioctl when no paths if queue_if_no_path set dm thin: do not set discard_zeroes_data
2012-09-28Merge branch 'master' of ↵John W. Linville84-2269/+1846
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem Conflicts: net/nfc/netlink.c Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-09-28netdev: octeon: fix return value check in octeon_mgmt_init_phy()Wei Yongjun1-3/+1
In case of error, the function of_phy_connect() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27Revert "be2net: fix vfs enumeration"David S. Miller1-2/+4
This reverts commit 51af6d7c1f31e0f3d42c87d53657ec7acb6e3462. Breaks the build with CONFIG_PCI_ATS not enabled. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds6-4/+14
Pull drm fixes from Dave Airlie: "The three nouveau fixes quiten unneeded dmesg spam that people are seeing and pondering, The udl fix stops it from trying to driver monitors that are too big, where we get a black screen. And a vmware memory alloc problem." * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/nvc0/fifo: ignore bits in PFIFO_INTR that aren't set in PFIFO_INTR_EN drm/udl: limit modes to the sku pixel limits. vmwgfx: corruption in vmw_event_fence_action_create() drm/nvc0/ltcg: mask off intr 0x10 drm/nouveau: silence a debug message triggered by newer userspace
2012-09-27Merge tag 'usb-3.6-rc7' of ↵Linus Torvalds3-6/+5
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg Kroah-Hartman: "Here are two USB bugfixes for your 3.6-rc7 tree. The OHCI fix has been reported a number of times and is a regression from 3.5, and the patch that causes the regression was on the way to the -stable trees before I was reminded (again) that this fix needed to get to your tree soon. The host controller bugfix was reported in older kernels as being pretty easy to trigger, and has been tested by Red Hat and their customers. Both have been in the usb-next branch in the -next tree for a while now, I just cherry-picked them out to get to you in time for the 3.6 release. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'usb-3.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: Fix race condition when removing host controllers USB: ohci-at91: fix null pointer in ohci_hcd_at91_overcurrent_irq
2012-09-27qlcnic: Fix scheduling while atomic bugNarendra K1-2/+2
In the device close path, 'qlcnic_fw_destroy_ctx' and 'qlcnic_poll_rsp' call msleep. But 'qlcnic_fw_destroy_ctx' and 'qlcnic_poll_rsp' are called with 'adapter->tx_clean_lock' spin lock held resulting in scheduling while atomic bug causing the following trace. I observed that the commit 012dc19a45b2b9cc2ebd14aaa401cf782c2abba4 from John Fastabend addresses a similar issue in ixgbevf driver. Adopting the same approach used in the commit, this patch uses mdelay to address the issue. [79884.999115] BUG: scheduling while atomic: ip/30846/0x00000002 [79885.005562] INFO: lockdep is turned off. [79885.009958] Modules linked in: qlcnic fuse nf_conntrack_netbios_ns nf_conntrack_broadcast ipt_MASQUERADE bnep bluetooth rfkill ip6table_mangle ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter ip6_tables iptable_nat nf_nat iptable_mangle ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack iptable_filter ip_tables dcdbas coretemp kvm_intel kvm iTCO_wdt ixgbe iTCO_vendor_support crc32c_intel ghash_clmulni_intel nfsd microcode sb_edac pcspkr edac_core dca bnx2x shpchp auth_rpcgss nfs_acl lpc_ich mfd_core mdio lockd libcrc32c wmi acpi_pad acpi_power_meter sunrpc uinput sd_mod sr_mod cdrom crc_t10dif ahci libahci libata megaraid_sas usb_storage dm_mirror dm_region_hash dm_log dm_mod [last unloaded: qlcnic] [79885.083608] Pid: 30846, comm: ip Tainted: G W O 3.6.0-rc7+ #1 [79885.090805] Call Trace: [79885.093569] [<ffffffff816764d8>] __schedule_bug+0x68/0x76 [79885.099699] [<ffffffff8168358e>] __schedule+0x99e/0xa00 [79885.105634] [<ffffffff81683929>] schedule+0x29/0x70 [79885.111186] [<ffffffff81680def>] schedule_timeout+0x16f/0x350 [79885.117724] [<ffffffff811afb7a>] ? init_object+0x4a/0x90 [79885.123770] [<ffffffff8107c190>] ? __internal_add_timer+0x140/0x140 [79885.130873] [<ffffffff81680fee>] schedule_timeout_uninterruptible+0x1e/0x20 [79885.138773] [<ffffffff8107e830>] msleep+0x20/0x30 [79885.144159] [<ffffffffa04c7fbf>] qlcnic_issue_cmd+0xef/0x290 [qlcnic] [79885.151478] [<ffffffffa04c8265>] qlcnic_fw_cmd_destroy_rx_ctx+0x55/0x90 [qlcnic] [79885.159868] [<ffffffffa04c92fd>] qlcnic_fw_destroy_ctx+0x2d/0xa0 [qlcnic] [79885.167576] [<ffffffffa04bf2ed>] __qlcnic_down+0x11d/0x180 [qlcnic] [79885.174708] [<ffffffffa04bf6f8>] qlcnic_close+0x18/0x20 [qlcnic] [79885.181547] [<ffffffff8153b4c5>] __dev_close_many+0x95/0xe0 [79885.187899] [<ffffffff8153b548>] __dev_close+0x38/0x50 [79885.193761] [<ffffffff81545101>] __dev_change_flags+0xa1/0x180 [79885.200419] [<ffffffff81545298>] dev_change_flags+0x28/0x70 [79885.206779] [<ffffffff815531b8>] do_setlink+0x378/0xa00 [79885.212731] [<ffffffff81354fe1>] ? nla_parse+0x31/0xe0 [79885.218612] [<ffffffff815558ee>] rtnl_newlink+0x37e/0x560 [79885.224768] [<ffffffff812cfa19>] ? selinux_capable+0x39/0x50 [79885.231217] [<ffffffff812cbf98>] ? security_capable+0x18/0x20 [79885.237765] [<ffffffff81555114>] rtnetlink_rcv_msg+0x114/0x2f0 [79885.244412] [<ffffffff81551f87>] ? rtnl_lock+0x17/0x20 [79885.250280] [<ffffffff81551f87>] ? rtnl_lock+0x17/0x20 [79885.256148] [<ffffffff81555000>] ? __rtnl_unlock+0x20/0x20 [79885.262413] [<ffffffff81570fc1>] netlink_rcv_skb+0xa1/0xb0 [79885.268661] [<ffffffff81551fb5>] rtnetlink_rcv+0x25/0x40 [79885.274727] [<ffffffff815708bd>] netlink_unicast+0x19d/0x220 [79885.281146] [<ffffffff81570c45>] netlink_sendmsg+0x305/0x3f0 [79885.287595] [<ffffffff8152b188>] ? sock_update_classid+0x148/0x2e0 [79885.294650] [<ffffffff81525c2c>] sock_sendmsg+0xbc/0xf0 [79885.300600] [<ffffffff8152600c>] __sys_sendmsg+0x3ac/0x3c0 [79885.306853] [<ffffffff8109be23>] ? up_read+0x23/0x40 [79885.312510] [<ffffffff816896cc>] ? do_page_fault+0x2bc/0x570 [79885.318968] [<ffffffff81191854>] ? sys_brk+0x44/0x150 [79885.324715] [<ffffffff811c458c>] ? fget_light+0x24c/0x520 [79885.330875] [<ffffffff815286f9>] sys_sendmsg+0x49/0x90 [79885.336707] [<ffffffff8168e429>] system_call_fastpath+0x16/0x1b Signed-off-by: Narendra K <narendra_k@dell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27bnx2: Clean up remaining iounmapNeil Horman1-1/+1
commit c0357e975afdbbedab5c662d19bef865f02adc17 modified bnx2 to switch from using ioremap/iounmap to pci_iomap/pci_iounmap. They missed a spot in the error path of bnx2_init_one though. This patch just cleans that up. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: Michael Chan <mcan@broadcom.com> CC: "David S. Miller" <davem@davemloft.net> Acked-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27Merge tag 'gpio-fixes-v3.6' of ↵Linus Torvalds1-0/+5
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fix from Linus Walleij: "A late GPIO fix: Roland Stigge found a problem in the LPC32xx driver where a callback ignores one of its arguments. It needs to go into stable too so sending this upstream immediately." * tag 'gpio-fixes-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio-lpc32xx: Fix value handling of gpio_direction_output()
2012-09-27Merge tag 'md-3.6-fixes' of git://neil.brown.name/mdLinus Torvalds2-3/+6
Pull two md bugfixes from NeilBrown: "One (missing spinlock init) was only introduced recently. The other has been present as long as raid10 has been supported, so is tagged for -stable." * tag 'md-3.6-fixes' of git://neil.brown.name/md: md/raid10: fix "enough" function for detecting if array is failed. md/raid5: add missing spin_lock_init.
2012-09-27Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edacLinus Torvalds3-4/+9
Pull EDAC fixes from Mauro Carvalho Chehab: "Three edac fixes at the memory enumeration logic: - i3200_edac: Fixes a regression at the memory rank size, when the memorias are dual-rank; - i5000_edac: Fix a longstanding bug when calculating the memory size: before Kernel 3.6, the memory size were right only with one specific configuration; - sb_edac: Fixes a bug since the initial release of the driver: with 16GB DIMMs, there's an overflow at the memory size, causing the number of pages per dimm (an unsigned value) to have the highest bit equal to 1, effectively mangling the memory size. The third bug can potentially affect the error decoding logic as well." * git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac: sb_edac: Avoid overflow errors at memory size calculation i5000: Fix the memory size calculation with 2R memories i3200_edac: Fix memory rank size
2012-09-27bna: Fix warning false positive.David S. Miller1-0/+1
GCC can't see that in all non-error-return paths we do in fact set *using_dac to something. Add an explicit initialization to remove this warning: drivers/net/ethernet/brocade/bna/bnad.c: In function ‘bnad_pci_probe’: drivers/net/ethernet/brocade/bna/bnad.c:3079:5: warning: ‘using_dac’ may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/net/ethernet/brocade/bna/bnad.c:3233:7: note: ‘using_dac’ was declared here Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27net: phy: smsc: Implement PHY config_init for LAN87xxMarek Vasut1-1/+27
The LAN8710/LAN8720 chips do have broken the "FlexPWR" smart power-saving capability. Enabling it leads to the PHY not being able to detect Link when cold-started without cable connected. Thus, make sure this is disabled. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Christian Hohnstaedt <chohnstaedt@innominate.com> Cc: David S. Miller <davem@davemloft.net> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Otavio Salvador <otavio@ossystems.com.br> Acked-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27be2net: fix vfs enumerationIvan Vecera1-4/+2
Current VFs enumeration algorithm used in be_find_vfs does not take domain number into the match. The match found in igb/ixgbe is more elegant and safe. Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27smsc75xx: fix resume after device resetSteve Glendinning1-0/+1
On some systems this device fails to properly resume after suspend, this patch fixes it by running the usbnet_resume handler. I suspect this also fixes this bug: http://code.google.com/p/chromium-os/issues/detail?id=31871 Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27lxt PHY: Support for the buggy LXT973 rev A2LEROY Christophe1-0/+127
This patch adds proper handling of the buggy revision A2 of LXT973 phy, adding precautions linked to ERRATA Item 4: Revision A2 of LXT973 chip randomly returns the contents of the previous even register when you read a odd register regularly Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27cxgb4: Don't attempt to upgrade T4 firmware when cxgb4 will end up as a slaveVipul Pandya5-5/+206
This patch adds a new common code routine to upgrade an adapter's firmware. This routine handles all of the complexities of working with the the existing adapter firmware in order to quiesce the adapter and uP, etc. For an automatic upgrade it will send a HELLO command to check if cxgb4 want/can upgrade firmware, i.e. if cxgb4 is MASTER and has newer firmware that it wants to load and call the new common code routine t4_fw_upgrade. Note that it should not issue a RESET command after a successful firmware upgrade. Signed-off-by: Jay Hernandez <jay@chelsio.com> Signed-off-by: Vipul Pandya <vipul@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27cxgb4: Inform caller if driver didn't upgrade firmwareVipul Pandya1-0/+6
If a card had already been initialized, on reloading cxgb4 driver firmware required an upgrade but the upgrade did not happen. In that case a mailbox timeout would occur during T4 configuration file stuff. The fix is to let the caller know the firmware was not upgraded so a reset would be issued before starting the T4 config stuff. Signed-off-by: Jay Hernandez <jay@chelsio.com> Signed-off-by: Vipul Pandya <vipul@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27cxgb4: Add support for T4 hardwired driver configuration settingsVipul Pandya5-32/+442
In case if user defined configuration file at /lib/firmware/cxgb4/t4-config.txt location and also factory default configuration file written to FLASH are not present then driver will use hardwired configuration settings. Signed-off-by: Jay Hernandez <jay@chelsio.com> Signed-off-by: Vipul Pandya <vipul@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27cxgb4: Add support for T4 configuration fileVipul Pandya6-133/+920
Starting with T4 firmware version 1.3.11.0 the firmware now supports device configuration via a Firmware Configuration File. The Firmware Configuration File was primarily developed in order to centralize all of the configuration, resource allocation, etc. for Unified Wire operation where multiple Physical / Virtual Function Drivers would be using a T4 adapter simultaneously. The Firmware Configuration file can live in three locations as shown below in order of precedence. 1) User defined configuration file: /lib/firmware/cxgb4/t4-config.txt 2) Factory Default configuration file written to FLASH within the manufacturing process. 3) Hardwired driver configuration. Signed-off-by: Jay Hernandez <jay@chelsio.com> Signed-off-by: Vipul Pandya <vipul@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27cxgb4/cxgb4vf: Code cleanup to enable T4 Configuration File supportVipul Pandya5-71/+365
This patch adds new enums and macros to enable T4 configuration file support. It also removes duplicate macro definitions. It fixes the build failure in cxgb4vf driver introduced because of old macro definition removal. It also performs SGE initialization based on T4 configuration file is provided or not. If it is provided then it uses the parameters provided in it otherwise it uses hard coded values. Signed-off-by: Jay Hernandez <jay@chelsio.com> Signed-off-by: Vipul Pandya <vipul@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27cxgb4: Add functions to read memory via PCIE memory windowVipul Pandya3-0/+219
This patch implements two new functions t4_mem_win_read and t4_memory_read. These new functions can be used to read memory via the PCIE memory window. Please note, for proper execution of these functions PCIE_MEM_ACCESS_BASE_WIN registers must be setup correctly like how setup_memwin in the cxgb4 driver does it. Signed-off-by: Jay Hernandez <jay@chelsio.com> Signed-off-by: Vipul Pandya <vipul@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27cxgb4: Fix incorrect values for MEMWIN*_APERTURE and MEMWIN*_BASEVipul Pandya1-4/+4
Signed-off-by: Jay Hernandez <jay@chelsio.com> Signed-off-by: Vipul Pandya <vipul@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27netdev: pasemi: fix return value check in pasemi_mac_phy_init()Wei Yongjun1-2/+2
In case of error, the function of_phy_connect() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27team: fix return value checkWei Yongjun1-6/+6
In case of error, the function genlmsg_put() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-09-27USB: Fix race condition when removing host controllersAlan Stern2-5/+3
This patch (as1607) fixes a race that can occur if a USB host controller is removed while a process is reading the /sys/kernel/debug/usb/devices file. The usb_device_read() routine uses the bus->root_hub pointer to determine whether or not the root hub is registered. The is not a valid test, because the pointer is set before the root hub gets registered and remains set even after the root hub is unregistered and deallocated. As a result, usb_device_read() or usb_device_dump() can access freed memory, causing an oops. The patch changes the test to use the hcd->rh_registered flag, which does get set and cleared at the appropriate times. It also makes sure to hold the usb_bus_list_lock mutex while setting the flag, so that usb_device_read() will become aware of new root hubs as soon as they are registered. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Don Zickus <dzickus@redhat.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>