aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-05-01net: aquantia: link status irq handlingIgor Russkikh4-19/+50
Here we define and request an extra interrupt line, assign it on link isr handler and restructure abit aq_pci code to better support that. We also remove logic for using different timer intervals depending on link state, since thats now useless. Signed-off-by: Igor Russkikh <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-05-01net: aquantia: create global service workqueueNikita Danilov4-1/+56
We need this to schedule link interrupt handling and various service tasks. Signed-off-by: Nikita Danilov <[email protected]> Signed-off-by: Igor Russkikh <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-05-01net: aquantia: link interrupt handling functionIgor Russkikh1-0/+14
Define link interrupt handler Signed-off-by: Nikita Danilov <[email protected]> Signed-off-by: Igor Russkikh <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-05-01net: aquantia: add link interrupt fieldsIgor Russkikh2-1/+4
Declare macroes and nic fields to support link interrupt handling Signed-off-by: Nikita Danilov <[email protected]> Signed-off-by: Igor Russkikh <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-05-01net: aquantia: implement hwmon api for chip temperatureYana Esina4-0/+144
Added support for hwmon api to fetch out chip temperature Signed-off-by: Yana Esina <[email protected]> Signed-off-by: Nikita Danilov <[email protected]> Signed-off-by: Igor Russkikh <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-05-01net: aquantia: add infrastructure to readout chip temperatureYana Esina3-0/+39
Ability to read the chip temperature from memory via hwmon interface Signed-off-by: Yana Esina <[email protected]> Signed-off-by: Nikita Danilov <[email protected]> Signed-off-by: Igor Russkikh <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-05-01sctp: avoid running the sctp state machine recursivelyXin Long3-38/+27
Ying triggered a call trace when doing an asconf testing: BUG: scheduling while atomic: swapper/12/0/0x10000100 Call Trace: <IRQ> [<ffffffffa4375904>] dump_stack+0x19/0x1b [<ffffffffa436fcaf>] __schedule_bug+0x64/0x72 [<ffffffffa437b93a>] __schedule+0x9ba/0xa00 [<ffffffffa3cd5326>] __cond_resched+0x26/0x30 [<ffffffffa437bc4a>] _cond_resched+0x3a/0x50 [<ffffffffa3e22be8>] kmem_cache_alloc_node+0x38/0x200 [<ffffffffa423512d>] __alloc_skb+0x5d/0x2d0 [<ffffffffc0995320>] sctp_packet_transmit+0x610/0xa20 [sctp] [<ffffffffc098510e>] sctp_outq_flush+0x2ce/0xc00 [sctp] [<ffffffffc098646c>] sctp_outq_uncork+0x1c/0x20 [sctp] [<ffffffffc0977338>] sctp_cmd_interpreter.isra.22+0xc8/0x1460 [sctp] [<ffffffffc0976ad1>] sctp_do_sm+0xe1/0x350 [sctp] [<ffffffffc099443d>] sctp_primitive_ASCONF+0x3d/0x50 [sctp] [<ffffffffc0977384>] sctp_cmd_interpreter.isra.22+0x114/0x1460 [sctp] [<ffffffffc0976ad1>] sctp_do_sm+0xe1/0x350 [sctp] [<ffffffffc097b3a4>] sctp_assoc_bh_rcv+0xf4/0x1b0 [sctp] [<ffffffffc09840f1>] sctp_inq_push+0x51/0x70 [sctp] [<ffffffffc099732b>] sctp_rcv+0xa8b/0xbd0 [sctp] As it shows, the first sctp_do_sm() running under atomic context (NET_RX softirq) invoked sctp_primitive_ASCONF() that uses GFP_KERNEL flag later, and this flag is supposed to be used in non-atomic context only. Besides, sctp_do_sm() was called recursively, which is not expected. Vlad tried to fix this recursive call in Commit c0786693404c ("sctp: Fix oops when sending queued ASCONF chunks") by introducing a new command SCTP_CMD_SEND_NEXT_ASCONF. But it didn't work as this command is still used in the first sctp_do_sm() call, and sctp_primitive_ASCONF() will be called in this command again. To avoid calling sctp_do_sm() recursively, we send the next queued ASCONF not by sctp_primitive_ASCONF(), but by sctp_sf_do_prm_asconf() in the 1st sctp_do_sm() directly. Reported-by: Ying Xu <[email protected]> Signed-off-by: Xin Long <[email protected]> Acked-by: Neil Horman <[email protected]> Acked-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-05-01stmmac: pci: Fix typo in IOT2000 commentJan Kiszka1-1/+1
Signed-off-by: Jan Kiszka <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-05-01Documentation: fix netdev-FAQ.rst markup warningRandy Dunlap1-1/+1
Fix ReST underline warning: ./Documentation/networking/netdev-FAQ.rst:135: WARNING: Title underline too short. Q: I made changes to only a few patches in a patch series should I resend only those changed? -------------------------------------------------------------------------------------------- Fixes: ffa91253739c ("Documentation: networking: Update netdev-FAQ regarding patches") Signed-off-by: Randy Dunlap <[email protected]> Cc: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2019-05-01io_uring: have submission side sqe errors post a cqeJens Axboe1-28/+6
Currently we only post a cqe if we get an error OUTSIDE of submission. For submission, we return the error directly through io_uring_enter(). This is a bit awkward for applications, and it makes more sense to always post a cqe with an error, if the error happens on behalf of an sqe. This changes submission behavior a bit. io_uring_enter() returns -ERROR for an error, and > 0 for number of sqes submitted. Before this change, if you wanted to submit 8 entries and had an error on the 5th entry, io_uring_enter() would return 4 (for number of entries successfully submitted) and rewind the sqring. The application would then have to peek at the sqring and figure out what was wrong with the head sqe, and then skip it itself. With this change, we'll return 5 since we did consume 5 sqes, and the last sqe (with the error) will result in a cqe being posted with the error. This makes the logic easier to handle in the application, and it cleans up the submission part. Suggested-by: Stefan Bühler <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2019-05-01mt76: mt7603: dynamically alloc mcu req in mt7603_mcu_set_eepromLorenzo Bianconi1-10/+20
Do not allocate mcu requests on the stack in mt7603_mcu_set_eeprom in order to avoid the following warning: Warning: the frame size of 1032 bytes is larger than 1024 bytes Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: do not enable/disable pre_tbtt_tasklet in scan_start/scan_completeLorenzo Bianconi3-5/+6
Do not enable/disable pre_tbtt_tasklet tasklet in mt76x02_sw_scan/mt76x02_sw_scan_complete since it is already done setting the operating channel. Do run tbtt_tasklet while the device is offchannel Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: mt7603: enable/disable pre_tbtt_tasklet in mt7603_set_channelLorenzo Bianconi2-2/+9
Disable pre_tbtt_tasklet tasklet before setting the operating channel. Enable/disable beacon_timer in mt7603_set_channel Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: move pre_tbtt_tasklet in mt76_devLorenzo Bianconi12-22/+20
Move pre_tbtt_tasklet tasklet in mt76_dev data structure since it is used by all drivers Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: add TX/RX antenna pattern capabilitiesRyder Lee1-0/+2
Announce antenna pattern cap to adapt PHY and baseband settings. Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: move beacon_mask in mt76_devLorenzo Bianconi8-26/+26
Move beacon_mask in mt76_dev data structure since it is used by all drivers Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: move beacon_int in mt76_devLorenzo Bianconi9-9/+9
Move beacon_int in mt76_dev data structure since it is used by all drivers Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: usb: use EP max packet aligned buffer sizes for rxStanislaw Gruszka1-5/+6
If buffer size is not usb_endpoint_maxp (512 or 1024 bytes) multiple, usb host driver has to use bounce buffer and copy data. For RX we can avoid that since we alreay allocate q->buf_size (2kB) buffers and mt76usb hardware will not fill more data as rx packet size is limited by network protocol. However add error message if this assumption somehow will be not true. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: mt7603: report firmware version using ethtoolLorenzo Bianconi1-0/+3
Print fw_ver and build_date members of struct mt7603_fw_trailer similarly to what appears in the output of 'dmesg' when the MCU firmware is loaded. Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: fix endianness sparse warningsRyder Lee2-7/+7
Fix many warnings with incorrect endian assumptions. Reported-by: kbuild test robot <[email protected]> Signed-off-by: Ryder Lee <[email protected]> Reviewed-by: Stanislaw Gruszka <[email protected] Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: mt76x02: mt76x02_poll_tx() can be statickbuild test robot1-1/+1
Fixes: ec7d2d74760a ("mt76: mt76x02: use napi polling for tx cleanup") Signed-off-by: kbuild test robot <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: mt7603: run __mt76_mcu_send_msg in mt7603_mcu_send_firmwareLorenzo Bianconi1-10/+5
Run __mt76_mcu_send_msg instead of __mt7603_mcu_msg_send and remove duplicated code. Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: mt7603: init mcu_restart function pointerLorenzo Bianconi1-3/+4
Use common function wrapper in mt7603_mcu_exit since the code is shared with mt7615 driver Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: introduce mt76_mcu_restart macroLorenzo Bianconi2-1/+3
Use common function wrapper in mt76x02_watchdog_reset Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: mt7603: initialize mt76_mcu_ops data structureLorenzo Bianconi4-11/+22
Use __mt76_mcu_send_msg wrapper instead of mt7603_mcu_msg_send. This is a preliminary patch for mt7615-mt7603 mcu code unification Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: mt7603: use standard signature for mt7603_mcu_msg_sendLorenzo Bianconi1-34/+27
Use mt76 common signature for mt7603_mcu_msg_send. Move skb allocation in mt7603_mcu_msg_send and remove duplicated code. This is a preliminary patch for mt7615-mt7603 mcu code unification Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: mt7603: remove query from mt7603_mcu_msg_send signatureLorenzo Bianconi1-22/+14
Remove query parameter from mt7603_mcu_msg_send/__mt7603_mcu_msg_send routine signature since it can be obtained from cmd value. This is a preliminary patch for mcu code unification between mt7615 and mt7603 drivers Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: mt7615: use sizeof instead of sizeof_fieldFelix Fietkau1-2/+1
It is simpler in this case Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: mt7603: fix initialization of max rx lengthFelix Fietkau2-1/+6
The previous version only accidentally disabled A-MSDU deaggregation by using the wrong mask for rx length configuration, which left previous length value in place. Fix the length and initialize the register completely to keep A-MSDU de-aggregation remaining disabled Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: mt76x02: remove irqsave/restore in locking for tx status fifoFelix Fietkau3-3/+6
Use a separate lock and spin_trylock to avoid disabling interrupts. Should improve performance and latency Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: mt76x02: use napi polling for tx cleanupFelix Fietkau2-14/+37
This allows tx scheduling and tx cleanup to run concurrently Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: mt76x02: remove bogus mutex usageStanislaw Gruszka4-41/+10
mac80211 .start(), .stop() callbacks are never called concurrently with other callbacks. The only concurencly is with mt76 works which we cancel on stop() and schedule on start(). This fixes possible deadlock on cancel_delayed_work_sync(&dev->mac_work) as mac_work also take mutex. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76usb: fix tx/rx stopStanislaw Gruszka7-42/+66
Disabling tasklets on stopping rx/tx is wrong. If blocked tasklet is scheduled and we remove device we will get 100% cpu usage: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 9 root 20 0 0 0 0 R 93.8 0.0 1:47.19 ksoftirqd/0 by infinite loop in tasklet_action_common() and eventuall crash on next mt76usb module load: [ 2068.591964] RIP: 0010:tasklet_action_common.isra.17+0x66/0x100 [ 2068.591966] Code: 41 89 f5 eb 25 f0 48 0f ba 33 00 0f 83 b1 00 00 00 48 8b 7a 20 48 8b 42 18 e8 56 a3 b5 00 f0 80 23 fd 48 89 ea 48 85 ed 74 53 <48> 8b 2a 48 8d 5a 08 f0 48 0f ba 6a 08 01 72 0b 8b 42 10 85 c0 74 [ 2068.591968] RSP: 0018:ffff98758c34be58 EFLAGS: 00010206 [ 2068.591969] RAX: ffff98758e6966d0 RBX: ffff98756e69aef8 RCX: 0000000000000006 [ 2068.591970] RDX: 01060a053d060305 RSI: 0000000000000006 RDI: ffff98758e6966d0 [ 2068.591971] RBP: 01060a053d060305 R08: 0000000000000000 R09: 00000000000203c0 [ 2068.591971] R10: 000003ff65b34f08 R11: 0000000000000001 R12: ffff98758e6966d0 [ 2068.591972] R13: 0000000000000006 R14: 0000000000000040 R15: 0000000000000006 [ 2068.591974] FS: 0000000000000000(0000) GS:ffff98758e680000(0000) knlGS:0000000000000000 [ 2068.591975] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2068.591975] CR2: 00002c5f73a6cc20 CR3: 00000002f920a001 CR4: 00000000003606e0 [ 2068.591977] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 2068.591978] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 2068.591978] Call Trace: [ 2068.591985] __do_softirq+0xe3/0x30a [ 2068.591989] ? sort_range+0x20/0x20 [ 2068.591990] run_ksoftirqd+0x26/0x40 [ 2068.591992] smpboot_thread_fn+0xc5/0x160 [ 2068.591995] kthread+0x112/0x130 [ 2068.591997] ? kthread_create_on_node+0x40/0x40 [ 2068.591998] ret_from_fork+0x35/0x40 [ 2068.591999] Modules linked in: ccm arc4 fuse rfcomm cmac bnep sunrpc snd_hda_codec_hdmi snd_soc_skl snd_soc_core snd_soc_acpi_intel_match snd_hda_codec_realtek snd_soc_acpi snd_hda_codec_generic snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp snd_hda_ext_core iTCO_wdt snd_hda_intel intel_rapl iTCO_vendor_support x86_pkg_temp_thermal intel_powerclamp btusb mei_wdt coretemp btrtl snd_hda_codec btbcm btintel intel_cstate snd_hwdep intel_uncore uvcvideo snd_hda_core videobuf2_vmalloc videobuf2_memops intel_rapl_perf wmi_bmof videobuf2_v4l2 intel_wmi_thunderbolt snd_seq bluetooth joydev videobuf2_common snd_seq_device snd_pcm videodev media i2c_i801 snd_timer idma64 ecdh_generic intel_lpss_pci intel_lpss mei_me mei ucsi_acpi typec_ucsi processor_thermal_device intel_soc_dts_iosf intel_pch_thermal typec thinkpad_acpi wmi snd soundcore rfkill int3403_thermal int340x_thermal_zone int3400_thermal acpi_thermal_rel acpi_pad pcc_cpufreq uas usb_storage crc32c_intel i915 i2c_algo_bit nvme serio_raw [ 2068.592033] drm_kms_helper e1000e nvme_core drm video ipv6 [last unloaded: cfg80211] Fortunate thing is that this not happen frequently, as scheduling tasklet on blocked state is very exceptional, though might happen. Due to different RX/TX tasklet processing fix is different for those. For RX we have to assure rx_tasklet do fail to resubmit buffers by poisoning urb's and kill the tasklet. For TX we need to handle all stop cases properly (suspend, module unload, device removal). Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: mt76x02u: remove bogus stop on suspendStanislaw Gruszka2-2/+0
On suspend mac80211 .stop callback is called before .suspend(), so hw mac is already stopped and we do not have to do this again. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01MAINTAINERS: update entry for mt76 wireless driverRyder Lee1-0/+2
Roy and I actively join the development and review. Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: use macro for sn and seq_ctrl conversionRyder Lee4-4/+4
Use macro to convert sn and seq_ctrl for better readability. Signed-off-by: Roy Luo <[email protected]> Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: add unlikely() for dma_mapping_error() checkRyder Lee1-4/+4
In the tx/rx fastpath, the funciton dma_map_single() rarely fails. This adds unlikely() optimization to this error check conditional. Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: add mac80211 driver for MT7615 PCIe-based chipsetsRyder Lee17-0/+4863
This driver is for a newer generation of MediaTek MT7615 4x4 802.11ac PCIe-based chipsets, which support wave2 MU-MIMO up to 4 users/group and also support up to 160MHz bandwidth. The driver fully supports AP, station and monitor mode. Signed-off-by: Ryder Lee <[email protected]> Signed-off-by: Roy Luo <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: dma: add skb check for dummy pointerLorenzo Bianconi2-4/+7
Introduce skb check for dummy address in mt76_dma_tx_cleanup_idx. This is a preliminary patch to add support for new chipsets (e.g. 7615) Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: dma: introduce skb field in mt76_txwi_cacheLorenzo Bianconi3-1/+8
Introduce skb field in mt76_txwi_cache. Moreover add txwi_flags to mt76_driver_ops since new chipsets will release mt76_txwi_cache/skbs at tx completion instead of dma one. This is a preliminary patch to add mt7615 support Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: add skb pointer to mt76_tx_infoLorenzo Bianconi9-39/+43
Pass skb pointer to tx_prepare_skb through mt76_tx_info data structure. This is a preliminary patch to properly support dma error path for new chipsets (e.g. 7615) Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: set txwi_size according to the driver valueLorenzo Bianconi5-13/+22
Dynamically allocate txwi since new chipsets will use longer txwi descriptors Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: usb: reduce locking in mt76u_tx_taskletLorenzo Bianconi1-8/+12
Similar to pci counterpart, reduce locking in mt76u_tx_tasklet since q->head is managed just in mt76u_tx_tasklet and q->queued is updated holding q->lock Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: move mac_work in mt76_devLorenzo Bianconi14-21/+20
Move mac_work delayed work in mt76_dev data structure since it is used by all drivers and it will be reused adding mac work to mt7615 Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: only schedule txqs from the tx taskletFelix Fietkau4-3/+6
Reduces lock contention from the tx path and improves performance Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: move tx tasklet to struct mt76_devFelix Fietkau9-20/+21
Allows it to be scheduled from core code Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: store wcid tx rate info in one u32 reduce lockingFelix Fietkau5-18/+27
Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: reduce locking in mt76_dma_tx_cleanupFelix Fietkau1-9/+17
q->tail can be safely updated without locking, because there is no concurrent access. If called from outside of the tasklet (for flushing), the tasklet is always disabled. q->queued can be safely read without locking, as long as the decrement happens within the locked section. This patch allows cleaning up tx packets outside of the section that holds the queue lock for improved performance Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: use mac80211 txq schedulingFelix Fietkau5-61/+67
Performance improvement and preparation for adding airtime fairness support Signed-off-by: Felix Fietkau <[email protected]>
2019-05-01mt76: use readl/writel instead of ioread32/iowrite32Felix Fietkau4-16/+16
Switching to readl/writel is faster because it gets rid of an unnecessary wrapper with extra checks. Signed-off-by: Felix Fietkau <[email protected]>