06 Jan, 2016
5 commits
-
Usually when driver sends data to firmware it receives TX_DONE
(DN_LD_HOST_INT_STATUS) interrupt from firmware right away.
It's also observed that some times the fireware could delay
sending DN_LD_HOST_INT_STATUS interrupt. If driver sends data to
firmware during suspend processing and the TX_DONE interrupt is
delayed, it may come back at wrong time when SDIO host driver is
in the middle of suspending.Block any data from stack while suspending. Also skip sending
data that are already in driver tx_queue.Don't purge the skb queue on suspend to avoid intermittent music
after system resumes from S3.Signed-off-by: Chin-Ran Lo
Signed-off-by: Amitkumar Karwar
Signed-off-by: Marcel Holtmann -
For gpio=0xff (wake up host through SDIO interface) case,
gap=0xff means no delay (same as gap=0) for incoming data packet
to be sent to host after host sleep is activated.
Change it to the maximum delay to reduce the chance that RX
interrupt could be delivered while host controller suspends.Signed-off-by: Chin-Ran Lo
Signed-off-by: Amitkumar Karwar
Signed-off-by: Marcel Holtmann -
Instead, allow using string formatting with send_monitor_note()
and access init_utsname().Signed-off-by: Johannes Berg
Signed-off-by: Marcel Holtmann -
This patch implements the mgmt Start Limited Discovery command. Most
of existing Start Discovery code is reused since the only difference
is the presence of a 'limited' flag as part of the discovery state.Signed-off-by: Johan Hedberg
Signed-off-by: Marcel Holtmann -
To make the EIR parsing helper more general purpose, make it return
the found data and its length rather than just saying whether the data
was present or not.Signed-off-by: Johan Hedberg
Signed-off-by: Marcel Holtmann
05 Jan, 2016
4 commits
-
The ieee802154_llsec_ops structure is never modified, so declare it as
const.Done with the help of Coccinelle.
Signed-off-by: Julia Lawall
Acked-by: Alexander Aring
Signed-off-by: Marcel Holtmann -
It's been observed that when bluetooth driver fails to
activate the firmware, below hung task warning dump is
displayed after 120 seconds.[ 36.461022] Bluetooth: vendor=0x2df, device=0x912e, class=255, fn=2
[ 56.512128] Bluetooth: FW failed to be active in time!
[ 56.517264] Bluetooth: Downloading firmware failed!
[ 240.252176] INFO: task kworker/3:2:129 blocked for more than 120 seconds.
[ 240.258931] Not tainted 3.18.0 #254
[ 240.262972] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 240.270751] kworker/3:2 D ffffffc000205760 0 129 2 0x00000000
[ 240.277825] Workqueue: events request_firmware_work_func
[ 240.283134] Call trace:
[ 240.285581] [] __switch_to+0x80/0x8c
[ 240.290693] [] __schedule+0x540/0x7b8
[ 240.295921] [] schedule+0x78/0x84
[ 240.300764] [] __mmc_claim_host+0xe8/0x1c8
[ 240.306395] [] sdio_claim_host+0x74/0x84
[ 240.311840] [] 0xffffffbffc163d08
[ 240.316685] [] 0xffffffbffc165104
[ 240.321524] [] mwifiex_dnld_fw+0x98/0x110 [mwifiex]
[ 240.327918] [] mwifiex_remove_card+0x2c4/0x5fc [mwifiex]
[ 240.334741] [] request_firmware_work_func+0x44/0x80
[ 240.341127] [] process_one_work+0x2ec/0x50c
[ 240.346831] [] worker_thread+0x350/0x470
[ 240.352272] [] kthread+0xf0/0xfc
[ 240.357019] 2 locks held by kworker/3:2/129:
[ 240.361248] #0: ("events"){.+.+.+}, at: [] process_one_work+0x1f8/0x50c
[ 240.369562] #1: ((&fw_work->work)){+.+.+.}, at: [] process_one_work+0x1f8/0x50c
[ 240.378589] task PC stack pid father
[ 240.384501] kworker/1:1 D ffffffc000205760 0 40 2 0x00000000
[ 240.391524] Workqueue: events mtk_atomic_work
[ 240.395884] Call trace:
[ 240.398317] [] __switch_to+0x80/0x8c
[ 240.403448] [] lock_acquire+0x128/0x164
[ 240.408821] kworker/3:2 D ffffffc000205760 0 129 2 0x00000000
[ 240.415867] Workqueue: events request_firmware_work_func
[ 240.421138] Call trace:
[ 240.423589] [] __switch_to+0x80/0x8c
[ 240.428688] [] __schedule+0x540/0x7b8
[ 240.433886] [] schedule+0x78/0x84
[ 240.438732] [] __mmc_claim_host+0xe8/0x1c8
[ 240.444361] [] sdio_claim_host+0x74/0x84
[ 240.449801] [] 0xffffffbffc163d08
[ 240.454649] [] 0xffffffbffc165104
[ 240.459486] [] mwifiex_dnld_fw+0x98/0x110 [mwifiex]
[ 240.465882] [] mwifiex_remove_card+0x2c4/0x5fc [mwifiex]
[ 240.472705] [] request_firmware_work_func+0x44/0x80
[ 240.479090] [] process_one_work+0x2ec/0x50c
[ 240.484794] [] worker_thread+0x350/0x470
[ 240.490231] [] kthread+0xf0/0xfcThis patch adds missing sdio_release_host() call so that wlan driver
thread can claim sdio host.Fixes: 4863e4cc31d647e1 ("Bluetooth: btmrvl: release sdio bus after firmware is up")
Signed-off-by: Chin-Ran Lo
Signed-off-by: Amitkumar Karwar
Signed-off-by: Marcel Holtmann -
These are used at least by Acer with BCM43241.
Signed-off-by: Heikki Krogerus
Signed-off-by: Marcel Holtmann -
The IDs should all be for Broadcom BCM43241 module, and
hci_bcm is now the proper driver for them. This removes one
of two different ways of handling PM with the module.Cc: Johannes Berg
Signed-off-by: Heikki Krogerus
Signed-off-by: Marcel Holtmann
03 Jan, 2016
1 commit
-
This patch adds checking the "CRC_OK" bit at the end of packets coming
from the CC2520 radio. It also adds support for putting the radio in
promiscuous mode (in which packets are not dropped if the CRC fails).
In promiscuous mode the AUTOCRC flag is cleared so that the driver can
pass the received CRC to the monitors.The radio now defaults to frame filtering (checking that the destination
and PANID in the incoming packet matches the local node). This matches
the other 15.4 radios and is what a user would expect to be the default.Other changes:
1. Adds LQI calculation
2. Makes #defines for relevant bit fields in CC2520 registersSigned-off-by: Brad Campbell
Acked-by: Varka Bhadram
Signed-off-by: Marcel Holtmann
01 Jan, 2016
7 commits
-
Pull PCI bugfix from Bjorn Helgaas:
"Here's another fix for v4.4.This fixes 32-bit config reads for the HiSilicon driver. Obviously
the driver is completely broken without this fix (apparently it
actually was tested internally, but got broken somehow in the process
of upstreaming it).Summary:
HiSilicon host bridge driver
Fix 32-bit config reads (Dongdong Liu)"* tag 'pci-v4.4-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
PCI: hisi: Fix hisi_pcie_cfg_read() 32-bit reads -
Pull sparc fixes from David Miller:
"Just some missing syscall wire ups"* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
sparc: Wire up mlock2 system call.
sparc: Add all necessary direct socket system calls. -
Pull networking fixes from David Miller:
1) Prevent XFRM per-cpu counter updates for one namespace from being
applied to another namespace. Fix from DanS treetman.2) Fix RCU de-reference in iwl_mvm_get_key_sta_id(), from Johannes
Berg.3) Remove ethernet header assumption in nft_do_chain_netdev(), from
Pablo Neira Ayuso.4) Fix cpsw PHY ident with multiple slaves and fixed-phy, from Pascal
Speck.5) Fix use after free in sixpack_close and mkiss_close.
6) Fix VXLAN fw assertion on bnx2x, from Yuval Mintz.
7) natsemi doesn't check for DMA mapping errors, from Alexey
Khoroshilov.8) Fix inverted test in ip6addrlbl_get(), from ANdrey Ryabinin.
9) Missing initialization of needed_headroom in geneve tunnel driver,
from Paolo Abeni.10) Fix conntrack template leak in openvswitch, from Joe Stringer.
11) Mission initialization of wq->flags in sock_alloc_inode(), from
Nicolai Stange.* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (35 commits)
sctp: sctp should release assoc when sctp_make_abort_user return NULL in sctp_close
net, socket, socket_wq: fix missing initialization of flags
drivers: net: cpsw: fix error return code
openvswitch: Fix template leak in error cases.
sctp: label accepted/peeled off sockets
sctp: use GFP_USER for user-controlled kmalloc
qlcnic: fix a loop exit condition better
net: cdc_ncm: avoid changing RX/TX buffers on MTU changes
geneve: initialize needed_headroom
ipv6: honor ifindex in case we receive ll addresses in router advertisements
addrconf: always initialize sysctl table data
ipv6/addrlabel: fix ip6addrlbl_get()
switchdev: bridge: Pass ageing time as clock_t instead of jiffies
sh_eth: fix 16-bit descriptor field access endianness too
veth: don’t modify ip_summed; doing so treats packets with bad checksums as good.
net: usb: cdc_ncm: Adding Dell DW5813 LTE AT&T Mobile Broadband Card
net: usb: cdc_ncm: Adding Dell DW5812 LTE Verizon Mobile Broadband Card
natsemi: add checks for dma mapping errors
rhashtable: Kill harmless RCU warning in rhashtable_walk_init
openvswitch: correct encoding of set tunnel action attributes
... -
Signed-off-by: David S. Miller
-
The GLIBC folks would like to eliminate socketcall support
eventually, and this makes sense regardless so wire them
all up.Signed-off-by: David S. Miller
-
…etooth/bluetooth-next
Johan Hedberg says:
====================
pull request: bluetooth-next 2015-12-31Here's (probably) the last bluetooth-next pull request for the 4.5
kernel:- Add support for BCM2E65 ACPI ID
- Minor fixes/cleanups in the bcm203x & bfusb drivers
- Minor debugfs related fix in 6lowpan codePlease let me know if there are any issues pulling. Thanks.
====================Signed-off-by: David S. Miller <davem@davemloft.net>
31 Dec, 2015
20 commits
-
Andrew Lunn says:
====================
Ethtool support for phy statsThis patchset add ethtool support for reading statistics from the PHY.
The Marvell and Micrel Phys are then extended to report receiver
packet errors and idle errors.v2:
Fix linking when phylib is not enabled.
v3:
Inline helpers into ethtool.c, so fixing when phylib is a module.
v4:
Add missing static
====================Signed-off-by: David S. Miller
-
The PHY counters receiver errors and errors while idle.
Signed-off-by: Andrew Lunn
Reviewed-by: Florian Fainelli
Signed-off-by: David S. Miller -
The PHY counters receiver errors and errors while idle.
Signed-off-by: Andrew Lunn
Reviewed-by: Florian Fainelli
Signed-off-by: David S. Miller -
Ethernet PHYs can maintain statistics, for example errors while idle
and receive errors. Add an ethtool mechanism to retrieve these
statistics, using the same model as MAC statistics.Signed-off-by: Andrew Lunn
Reviewed-by: Florian Fainelli
Signed-off-by: David S. Miller -
In sctp_close, sctp_make_abort_user may return NULL because of memory
allocation failure. If this happens, it will bypass any state change
and never free the assoc. The assoc has no chance to be freed and it
will be kept in memory with the state it had even after the socket is
closed by sctp_close().So if sctp_make_abort_user fails to allocate memory, we should abort
the asoc via sctp_primitive_ABORT as well. Just like the annotation in
sctp_sf_cookie_wait_prm_abort and sctp_sf_do_9_1_prm_abort said,
"Even if we can't send the ABORT due to low memory delete the TCB.
This is a departure from our typical NOMEM handling".But then the chunk is NULL (low memory) and the SCTP_CMD_REPLY cmd would
dereference the chunk pointer, and system crash. So we should add
SCTP_CMD_REPLY cmd only when the chunk is not NULL, just like other
places where it adds SCTP_CMD_REPLY cmd.Signed-off-by: Xin Long
Acked-by: Marcelo Ricardo Leitner
Signed-off-by: David S. Miller -
…m/linux/kernel/git/kvalo/wireless-drivers
Kalle Valo says:
====================
iwlwifi* don't load firmware that won't exist for 7260
* fix RCU splat
====================Signed-off-by: David S. Miller <davem@davemloft.net>
-
Commit ceb5d58b2170 ("net: fix sock_wake_async() rcu protection") from
the current 4.4 release cycle introduced a new flags member in
struct socket_wq and moved SOCKWQ_ASYNC_NOSPACE and SOCKWQ_ASYNC_WAITDATA
from struct socket's flags member into that new place.Unfortunately, the new flags field is never initialized properly, at least
not for the struct socket_wq instance created in sock_alloc_inode().One particular issue I encountered because of this is that my GNU Emacs
failed to draw anything on my desktop -- i.e. what I got is a transparent
window, including the title bar. Bisection lead to the commit mentioned
above and further investigation by means of strace told me that Emacs
is indeed speaking to my Xorg through an O_ASYNC AF_UNIX socket. This is
reproducible 100% of times and the fact that properly initializing the
struct socket_wq ->flags fixes the issue leads me to the conclusion that
somehow SOCKWQ_ASYNC_WAITDATA got set in the uninitialized ->flags,
preventing my Emacs from receiving any SIGIO's due to data becoming
available and it got stuck.Make sock_alloc_inode() set the newly created struct socket_wq's ->flags
member to zero.Fixes: ceb5d58b2170 ("net: fix sock_wake_async() rcu protection")
Signed-off-by: Nicolai Stange
Acked-by: Eric Dumazet
Signed-off-by: David S. Miller -
Jeff Kirsher says:
====================
10GbE Intel Wired LAN Driver Updates 2015-12-29This series contains updates to ixgbe and ixgbevf.
William Dauchy provides a fix for ixgbevf that was implemented for ixgbe,
commit 5d6002b7b822c7 ("ixgbe: Fix handling of NAPI budget when multiple
queues are enabled per vector"). The issue was that the polling routine
would increase the budget for receive to at least 1 per queue if multiple
queues were present, which resulted in receive packets being processed
when the budget was 0.Emil provides minor cleanups for ixgbevf, one being that we need to
check rx_itr_setting with == and not &, since it is not a mask. Added
QSFP PHY support in ixgbe to allow for more accurate reporting of port
settings. Fixed the max RSS limit for X550 which is 63, not 64.Veola fixes ixgbe ethtool reporting of backplane type interfaces as
1000/10000baseT link modes, instead, report the media as KR, KX or KX4
based on the backplane interface present.Mark cleans up redundancy in the setting of hw_enc_features that makes
it appear that X550 has more encapsulation features than other devices.
Also do not set NETIF_F_SG any longer since that is set by the
register_netdev() call. Also fixed the X550EM_x revision check, which
needs to check a value, not just a bit.Alex Duyck fixes additional bugs in ixgbe_clear_vf_vlans(), one being
that the mask was using a divide instead of a modulus, which resulted
in the mask bit being incorrectly set to 0 or 1 based on the value of
the VF being tested. Alex also found that he was not consistent in
using the "word" argument as an offset or as a register offset, so
made the code consistently use word as the offset in the array.v2: dropped patch 8 of the original series, as it was undoing a part of
the fix Alex Duyck was doing in patch 9 of the original series.
Dropped based on feedback from Emil (the author).
====================Signed-off-by: David S. Miller
-
Sathya Perla says:
====================
be2net: patch setThe following patch set contains some feature additions, code re-organization
and cleanup and a few non-critical fixes. Pls consider applying this to
the net-next tree. Thanks.v3 changes: add a default case to the switch statement in patch 5 to
satisfy the compiler (-Wswitch).
v2 changes: replaced an if/else block that checks for error values with a
switch/case statement in patch 5.Patch 1 fixes VF link state transition from disabled to auto that did
not work due to an issue in the FW. This issue could not be fixed in FW due
to some backward compatibility issues it causes with released drivers.
The issue has been fixed by introducing a new version (v2) of the cmd
from 10.6 FW onwards. This patch adds support for v2 version of this cmd.Patch 2 reports a EOPNOTSUPP status to ethtool when the user tries to
configure BE3/SRIOV in VEPA mode as it is not supported by the chip.Patch 3 cleansup FW flash image related constant definitions. Many of these
definitions (such as section offset values) were defined in decimal format
rather than hexa-decimal. This makes this part of the code un-readable.
Also some defines related to BE2 are labeld "g2" and defines related to BE3
are labeled "g3". This patch cleans up all of this to make this code more
readable.Patch 4 moves the FW cmd code to be_cmds.c. All code relating to FW cmds
has been in be_cmds.[ch], excepting FW flash cmd related code.
This patch moves these routines from be_main.c to be_cmds.c.Patch 5 adds a log message to report digital signature errors while
flashing a FW image. From FW version 11.0 onwards, the FW supports a new
"secure mode" feature (based on a jumper setting on the adapter.) In this
mode, the FW image when flashed is authenticated with a digital signature.Patch 6 removes a line of code that has no effect.
Patch 7 removes some unused variables.
Patch 8 fixes port resource descriptor query via the GET_PROFILE FW cmd.
An earlier commit passed a specific pf_num while issuing this cmd as FW
returns descriptors for all functions when pf_num is zero. But, when pf_num
is set to a non-zero value, FW does not return the port resource descriptor.
This patch fixes this by setting pf_num to 0 while issuing the query cmd
and adds code to pick the correct NIC resource descriptor from the list of
descriptors returned by FW.Patch 9 adds support for ethtool get-dump feature. In the past when this
option was not yet available, this feature was supported via the
--register-dump option as a workaround. This patch removes support for
FW-dump via --register-dump option as it is now available via --get-dump
option. Even though the "ethtool --register-dump" cmd which used to work
earlier, will now fail with ENOTSUPP error, we feel it is not an issue as
this is used only for diagnostics purpose.Patch 10 bumps up the driver version.
====================Signed-off-by: David S. Miller
-
Signed-off-by: Suresh Reddy
Signed-off-by: Sathya Perla
Signed-off-by: David S. Miller -
This patch adds support for ethtool's --get-dump option in be2net,
to retrieve FW dump. In the past when this option was not yet available,
this feature was supported via the --register-dump option as a workaround.
This patch removes support for FW-dump via --register-dump option as it is
now available via --get-dump option. Even though the
"ethtool --register-dump" cmd which used to work earlier, will now fail
with ENOTSUPP error, we feel it is not an issue as this is used only
for diagnostics purpose.Signed-off-by: Venkat Duvvuru
Signed-off-by: Sathya Perla
Signed-off-by: David S. Miller -
Commit 72ef3a88fa8e ("be2net: set pci_func_num while issuing
GET_PROFILE_CONFIG cmd") passed a specific pf_num while issuing a
GET_PROFILE_CONFIG cmd as FW returns descriptors for all functions when
pf_num is zero. But, when pf_num is set to a non-zero value, FW does not
return the Port resource descriptor.
This patch fixes this by setting pf_num to 0 while issuing the query cmd
and adds code to pick the correct NIC resource descriptor from the list of
descriptors returned by FW.Fixes: 72ef3a88fa8e ("be2net: set pci_func_num while issuing
GET_PROFILE_CONFIG cmd")
Signed-off-by: Suresh ReddySigned-off-by: Sathya Perla
Signed-off-by: David S. Miller -
eeh_error, fw_timeout, hw_error variables in the be_adapter structure are
not used anymore. An earlier patch that introduced adapter->err_flags to
store this information missed removing these variables.Signed-off-by: Venkat Duvvuru
Signed-off-by: Sathya Perla
Signed-off-by: David S. Miller -
This patch removes a line of code that changes adapter->recommended_prio
value followed by yet another assignment.
Also, the variable is used to store the vlan priority value that is already
shifted to the PCP bits position in the vlan tag format. Hence, the name of
this variable is changed to recommended_prio_bits.Signed-off-by: Sathya Perla
Signed-off-by: David S. Miller -
(based on a jumper setting on the adapter.) In this mode, the FW image when
flashed is authenticated with a digital signature. This patch logs
appropriate error messages and return a status to ethtool when errors
relating to FW image authentication occur.Signed-off-by: Suresh Reddy
Signed-off-by: Sathya Perla
Signed-off-by: David S. Miller -
All code relating to FW cmds is in be_cmds.[ch] excepting FW flash cmd
related code. This patch moves these routines from be_main.c to be_cmds.cSigned-off-by: Suresh Reddy
Signed-off-by: Sathya Perla
Signed-off-by: David S. Miller -
Many constant definitions relating to the FW-image layout
(such as section offset values) were defined in decimal format rather than
hexa-decimal. This makes this part of the code un-readable. Also some
defines related to BE2 are labeld "g2" and defines related to BE3 are
labeled "g3". This patch cleans up all of this to make this code more
readable.Signed-off-by: Suresh Reddy
Signed-off-by: Sathya Perla
Signed-off-by: David S. Miller -
BE3 chip doesn't support VEPA mode.
Signed-off-by: Suresh Reddy
Signed-off-by: Sathya Perla
Signed-off-by: David S. Miller -
The VF link state setting transition from "disable" to "auto" does not work
due to a bug in SET_LOGICAL_LINK_CONFIG_V1 cmd in FW. This issue could not
be fixed in FW due to some backward compatibility issues it causes with
some released drivers. The issue has been fixed by introducing a new
version (v2) of the cmd from 10.6 FW onwards. In v2, to set the VF link
state to auto, both PLINK_ENABLE and PLINK_TRACK bits have to be set to 1.The VF link state setting feature now works on Lancer chips too from
FW ver 10.6.315.0 onwards.Signed-off-by: Suresh Reddy
Signed-off-by: Sathya Perla
Signed-off-by: David S. Miller -
Pull block fixes from Jens Axboe:
"Make the block layer great again.Basically three amazing fixes in this pull request, split into 4
patches. Believe me, they should go into 4.4. Two of them fix a
regression, the third and last fixes an easy-to-trigger bug.- Fix a bad irq enable through null_blk, for queue_mode=1 and using
timer completions. Add a block helper to restart a queue
asynchronously, and use that from null_blk. From me.- Fix a performance issue in NVMe. Some devices (Intel Pxxxx) expose
a stripe boundary, and performance suffers if we cross it. We took
that into account for merging, but not for the newer splitting
code. Fix from Keith.- Fix a kernel oops in lightnvm with multiple channels. From Matias"
* 'for-linus' of git://git.kernel.dk/linux-block:
lightnvm: wrong offset in bad blk lun calculation
null_blk: use async queue restart helper
block: add blk_start_queue_async()
block: Split bios on chunk boundaries
30 Dec, 2015
3 commits
-
When I had rewritten the code for ixgbe_clear_vf_vlans() it looks like I
had transitioned back and forth between using word as an offset and using
word as a register offset. As a result I honestly don't see how the code
was working before other than the fact that resetting the VLANs on the VF
like didn't do much to clear them.Another issue found is that the mask was using a divide instead of a
modulus. As a result the mask bit was incorrectly being set to either bit
0 or 1 based on the value of the VF being tested. As a result the wrong
VFs were having their VLANs cleared if they were enabled.I have updated the code so that word represents the offset in the array.
This way we can use the modulus and xor operations and they will make sense
instead of being performed on a 4 byte aligned value.I replaced the statement "(word % 2) ^ 1" with "~word % 2" in order to
reduce the line length as the line exceeded 80 characters with the register
name inserted. The two should be equivalent so the change should be safe.Reported-by: Emil Tantilov
Signed-off-by: Alexander Duyck
Tested-by: Phil Schmitt
Signed-off-by: Jeff Kirsher -
The X550EM_x revision check needs to check a value, not just a bit.
Use a mask and check the value. Also remove the redundant check
inside the ixgbe_enter_lplu_t_x550em, because it can only be called
when both the mac type and revision check pass.Signed-off-by: Mark Rustad
Tested-by: Phil Schmitt
Signed-off-by: Jeff Kirsher -
X550 allows for up to 64 RSS queues, but the driver can have max
of 63 (-1 MSIX vector for link).On systems with >= 64 CPUs the driver will set the redirection table
for all 64 queues which will result in packets being dropped.Signed-off-by: Emil Tantilov
Tested-by: Phil Schmitt
Signed-off-by: Jeff Kirsher