stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: akpm@linux-foundation.org,
	"David S. Miller" <davem@davemloft.net>,
	"Nisar Sayed" <Nisar.Sayed@microchip.com>
Subject: [PATCH 3.16 115/133] smsc95xx: Configure pause time to 0xffff when tx flow control enabled
Date: Wed, 22 Nov 2017 01:58:13 +0000	[thread overview]
Message-ID: <lsq.1511315893.64314184@decadent.org.uk> (raw)
In-Reply-To: <lsq.1511315892.657723235@decadent.org.uk>

3.16.51-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Nisar Sayed <Nisar.Sayed@microchip.com>

commit 9c0827317f235865ae421293f8aecf6cb327a63e upstream.

Configure pause time to 0xffff when tx flow control enabled

Set pause time to 0xffff in the pause frame to indicate the
partner to stop sending the packets. When RX buffer frees up,
the device sends pause frame with pause time zero for partner to
resume transmission.

Fixes: 2f7ca802bdae ("Add SMSC LAN9500 USB2.0 10/100 ethernet adapter driver")
Signed-off-by: Nisar Sayed <Nisar.Sayed@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 drivers/net/usb/smsc95xx.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -516,7 +516,7 @@ static void smsc95xx_set_multicast(struc
 static int smsc95xx_phy_update_flowcontrol(struct usbnet *dev, u8 duplex,
 					   u16 lcladv, u16 rmtadv)
 {
-	u32 flow, afc_cfg = 0;
+	u32 flow = 0, afc_cfg;
 
 	int ret = smsc95xx_read_reg(dev, AFC_CFG, &afc_cfg);
 	if (ret < 0)
@@ -527,20 +527,19 @@ static int smsc95xx_phy_update_flowcontr
 
 		if (cap & FLOW_CTRL_RX)
 			flow = 0xFFFF0002;
-		else
-			flow = 0;
 
-		if (cap & FLOW_CTRL_TX)
+		if (cap & FLOW_CTRL_TX) {
 			afc_cfg |= 0xF;
-		else
+			flow |= 0xFFFF0000;
+		} else {
 			afc_cfg &= ~0xF;
+		}
 
 		netif_dbg(dev, link, dev->net, "rx pause %s, tx pause %s\n",
 				   cap & FLOW_CTRL_RX ? "enabled" : "disabled",
 				   cap & FLOW_CTRL_TX ? "enabled" : "disabled");
 	} else {
 		netif_dbg(dev, link, dev->net, "half duplex\n");
-		flow = 0;
 		afc_cfg |= 0xF;
 	}
 

  parent reply	other threads:[~2017-11-22  1:58 UTC|newest]

Thread overview: 142+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22  1:58 [PATCH 3.16 000/133] 3.16.51-rc1 review Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 008/133] IB/core: Fix the validations of a multicast LID in attach or detach operations Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 022/133] x86/fsgsbase/64: Report FSBASE and GSBASE correctly in core dumps Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 021/133] ARM: OMAP2+: omap_device: drop broken RPM status update from suspend_noirq Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 019/133] wcn36xx: Remove unnecessary rcu_read_unlock in wcn36xx_bss_info_changed Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 033/133] iio: accel: st_accel: fix data-ready line configuration Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 023/133] scsi: zfcp: fix queuecommand for scsi_eh commands when DIX enabled Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 018/133] wcn36xx: Introduce mutual exclusion of fw configuration Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 029/133] scsi: zfcp: trace HBA FSF response by default on dismiss or timedout late response Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 004/133] backlight: lm3630a: Bump REG_MAX value to 0x50 instead of 0x1F Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 007/133] powerpc/mm: Build fix for non SPARSEMEM_VMEMAP config Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 012/133] printk: only unregister boot consoles when necessary Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 032/133] iio: pressure: st_pressure: fix drdy configuration for LPS22HB and LPS25H Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 043/133] media: uvcvideo: Prevent heap overflow when accessing mapped controls Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 003/133] iio: magnetometer: st_magn_core: enable multiread by default for LIS3MDL Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 009/133] signal: move the "sig < SIGRTMIN" check into siginmask(sig) Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 039/133] block: Relax a check in blk_start_queue() Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 030/133] scsi: mac_esp: Fix PIO transfers for MESSAGE IN phase Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 031/133] cs5536: add support for IDE controller variant Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 011/133] asm/sections: add helpers to check for section data Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 028/133] scsi: zfcp: fix payload with full FCP_RSP IU in SCSI trace records Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 047/133] pwm: tiehrpwm: fix clock imbalance in probe error path Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 013/133] printk/console: Always disable boot consoles that use init memory before it is freed Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 027/133] scsi: zfcp: fix missing trace records for early returns in TMF eh handlers Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 036/133] perf events parse: Use just one parse events state struct Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 034/133] btrfs: resume qgroup rescan on rw remount Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 026/133] scsi: zfcp: fix passing fsf_req to SCSI trace on TMF to correlate with HBA Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 006/133] media: docs-rst: v4l: Fix sink compose selection target documentation Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 040/133] skd: Avoid that module unloading triggers a use-after-free Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 042/133] net: don't decrement kobj reference count on init failure Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 001/133] ARM: dts: dra7-evm: Rename mmc2_3v3 supply to evm_3v3_sw Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 015/133] powerpc/mm: Fix check of multiple 16G pages from device tree Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 014/133] rtlwifi: rtl8821ae: Fix HW_VAR_NAV_UPPER operation Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 017/133] dlm: avoid double-free on error path in dlm_device_{register,unregister} Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 020/133] media: v4l2-compat-ioctl32: Fix timespec conversion Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 024/133] scsi: zfcp: add handling for FCP_RESID_OVER to the fcp ingress path Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 035/133] perf events parse: Rename parsing state struct to clearer name Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 005/133] perf tests attr: Fix no-delay test Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 041/133] skd: Submit requests to firmware before triggering the doorbell Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 038/133] iwlwifi: pci: add new PCI ID for 7265D Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 025/133] scsi: zfcp: fix capping of unsuccessful GPN_FT SAN response trace records Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 010/133] fcntl: Don't use ambiguous SIG_POLL si_codes Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 046/133] pwm: tiehrpwm: Fix runtime PM imbalance at unbind Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 044/133] media: lirc_zilog: driver only sends LIRCCODE Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 045/133] staging/rts5208: fix incorrect shift to extract upper nybble Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 037/133] drm/ttm: Fix accounting error when fail to get pages for pool Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 002/133] ARM: dts: dra7-evm: Correct the vmmc-supply for mmc2 Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 016/133] PCI: shpchp: Enable bridge bus mastering if MSI is enabled Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 120/133] sctp: do not peel off an assoc from one netns to another one Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 107/133] genirq: Make sparse_irq_lock protect what it should protect Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 112/133] Input: xpad - add support for Xbox One controllers Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 056/133] USB: core: Avoid race of async_completed() w/ usbdev_release() Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 051/133] RDMA/usnic: Fix remove address space warning Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 106/133] tracing: Apply trace_clock changes to instance max buffer Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 072/133] powerpc: Fix DAR reporting when alignment handler faults Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 050/133] rtc: sa1100: fix unbalanced clk_prepare_enable/clk_disable_unprepare Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 077/133] ftrace: Fix selftest goto location on error Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 082/133] l2tp: pass tunnel pointer to ->session_create() Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 059/133] usb:xhci:Fix regression when ATI chipsets detected Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 103/133] bcache: fix for gc and write-back race Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 060/133] ACPI, APEI, EINJ: Subtract any matching Register Region from Trigger resources Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 071/133] powerpc/44x: Fix mask and shift to zero bug Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 100/133] bcache: correct cache_dirty_target in __update_writeback_rate() Ben Hutchings
2017-11-22  3:41   ` Joe Perches
2017-11-23 13:08     ` Ben Hutchings
2017-11-23 14:21       ` Joe Perches
2017-11-22  1:58 ` [PATCH 3.16 083/133] mfd: max8998: Fix potential NULL pointer dereference Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 049/133] perf tools: Really install manpages via 'make install-man' Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 070/133] scsi: qla2xxx: Fix an integer overflow in sysfs code Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 124/133] Input: gtco - fix potential out-of-bound access Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 075/133] driver core: bus: Fix a potential double free Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 048/133] f2fs: check hot_data for roll-forward recovery Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 066/133] USB: serial: option: add support for D-Link DWM-157 C1 Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 126/133] net: qmi_wwan: fix divide by 0 on bad descriptors Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 086/133] mac80211: flush hw_roc_start work before cancelling the ROC Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 081/133] l2tp: prevent creation of sessions on terminated tunnels Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 078/133] ARC: Re-enable MMU upon Machine Check exception Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 085/133] mac80211_hwsim: Use proper TX power Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 058/133] usb: Add device quirk for Logitech HD Pro Webcam C920-C Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 088/133] MIPS: AR7: allow NULL clock for clk_get_rate Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 080/133] Revert "net: use lib/percpu_counter API for fragmentation mem accounting" Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 064/133] net/mlx4_core: Make explicit conversion to 64bit value Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 097/133] bcache: Fix leak of bdev reference Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 127/133] mac80211: use constant time comparison with keys Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 113/133] Input: xpad - don't depend on endpoint order Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 052/133] IB/mlx5: Fix integer overflow when page_shift == 31 Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 095/133] MIPS: microMIPS: Fix decoding of swsp16 instruction Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 109/133] ipv6: fix memory leak with multiple tables during netns destruction Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 111/133] Input: ucb1400_ts - fix suspend and resume handling Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 076/133] md/bitmap: disable bitmap_resize for file-backed bitmaps Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 090/133] MIPS: Loongson 2F: allow NULL clock for clk_get_rate Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 131/133] VSOCK: Detach QP check should filter out non matching QPs Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 110/133] ipv6: fix typo in fib6_net_exit() Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 132/133] kvm/x86: Handle async PF in RCU read-side critical sections Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 079/133] xfs: fix incorrect log_flushed on fsync Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 069/133] regulator: da9063: Return an error code on probe failure Ben Hutchings
2017-11-22  1:58 ` Ben Hutchings [this message]
2017-11-22  1:58 ` [PATCH 3.16 122/133] [media] cx231xx-cards: fix NULL-deref on missing association descriptor Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 067/133] iwlwifi: mvm: simplify bufferable MMPDU check Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 101/133] bcache: Correct return value for sysfs attach errors Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 118/133] KVM: async_pf: Fix #DF due to inject "Page not Present" and "Page Ready" exceptions simultaneously Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 125/133] net: cdc_ether: fix divide by 0 on bad descriptors Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 068/133] iwlwifi: mvm: Avoid deferring non bufferable frames Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 053/133] media: em28xx: calculate left volume level correctly Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 133/133] kvm/x86: Avoid async PF preempting the kernel incorrectly Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 055/133] staging: lustre: obdclass: return -EFAULT if copy_from_user() fails Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 094/133] MIPS: microMIPS: Fix decoding of addiusp instruction Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 099/133] bcache: do not subtract sectors_to_gc for bypassed IO Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 073/133] powerpc: Correct instruction code for xxlor instruction Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 087/133] s390/mm: fix race on mm->context.flush_mm Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 096/133] MIPS: Stacktrace: Fix microMIPS stack unwinding on big endian systems Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 104/133] bcache: fix bch_hprint crash and improve output Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 074/133] xen/events: events_fifo: Don't use {get,put}_cpu() in xen_evtchn_fifo_init() Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 116/133] KVM: SVM: Add a missing 'break' statement Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 084/133] mfd: omap-usb-tll: Fix register offsets Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 054/133] m68k: allow NULL clock for clk_get_rate Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 065/133] scsi: aacraid: Fix command send race condition Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 123/133] media: imon: Fix null-ptr-deref in imon_probe Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 129/133] VSOCK: sock_put wasn't safe to call in interrupt context Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 121/133] USB: serial: console: fix use-after-free after failed setup Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 062/133] IB/usnic: check for allocation failure Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 105/133] mm/vmstat.c: fix wrong comment Ben Hutchings
2017-11-22  7:41   ` Vlastimil Babka
2017-11-23 13:05     ` Ben Hutchings
2017-11-23 13:42       ` Michal Hocko
2017-11-22  1:58 ` [PATCH 3.16 092/133] MIPS: Handle non word sized instructions when examining frame Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 102/133] bcache: fix crash on shutdown in passthrough mode Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 057/133] usb: quirks: add delay init quirk for Corsair Strafe RGB keyboard Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 091/133] MIPS: ralink: allow NULL clock for clk_get_rate Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 114/133] Input: xpad - validate USB endpoint type during probe Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 117/133] IB/mlx4: fix sprintf format warning Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 089/133] MIPS: BCM63XX: allow NULL clock for clk_get_rate Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 128/133] mac80211: don't compare TKIP TX MIC key in reinstall prevention Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 108/133] bcache: initialize dirty stripes in flash_dev_run() Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 119/133] Input: i8042 - add Gigabyte P57 to the keyboard reset table Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 130/133] VSOCK: Fix lockdep issue Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 063/133] ARM: 8692/1: mm: abort uaccess retries upon fatal signal Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 061/133] IB/{qib, hfi1}: Avoid flow control testing for RDMA write operation Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 098/133] bcache: fix sequential large write IO bypass Ben Hutchings
2017-11-22  1:58 ` [PATCH 3.16 093/133] MIPS: microMIPS: Fix detection of addiusp instruction Ben Hutchings
2017-11-22 15:00 ` [PATCH 3.16 000/133] 3.16.51-rc1 review Guenter Roeck
2017-11-22 20:51   ` Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=lsq.1511315893.64314184@decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=Nisar.Sayed@microchip.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).