Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1257119
| From | Dan Streetman <dan.streetman@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCHv2] ixgbe: Wait for 1ms, not 1us, after RST |
| Date | 2015-10-27 19:30 +0100 |
| Message-ID | <qohaq-8R-23@gated-at.bofh.it> (permalink) |
| References | <qogHo-8bo-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The driver currently waits 1us after issuing a RST, but the spec
requires it to wait 1ms. This adds a msleep(1) before polling the
reset bit.
Signed-off-by: Dan Streetman <dan.streetman@canonical.com>
Signed-off-by: Dan Streetman <ddstreet@ieee.org>
---
changes since v1:
use msleep(1) instead of mdelay(1), per Peter Hurley
move msleep(1) out of for loop - only msleep once, leave udelay(1)
inside for loop
use spec sec title instead of number, per Don Skidmore
drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c
index 4e75843..02cfa1e 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c
@@ -111,6 +111,13 @@ mac_reset_top:
IXGBE_WRITE_REG(hw, IXGBE_CTRL, ctrl);
IXGBE_WRITE_FLUSH(hw);
+ /* From the spec "General Control Registers - Device Control Register":
+ * "...programmers must wait approximately 1 ms after setting before
+ * attempting to check if the bit has cleared or to access (read
+ * or write) any other device register."
+ */
+ msleep(1);
+
/* Poll for reset bit to self-clear indicating reset is complete */
for (i = 0; i < 10; i++) {
udelay(1);
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] ixgbe: Wait for 1ms, not 1us, after RST dan.streetman@canonical.com - 2015-10-27 01:20 +0100
RE: [PATCH] ixgbe: Wait for 1ms, not 1us, after RST "Skidmore, Donald C" <donald.c.skidmore@intel.com> - 2015-10-27 18:10 +0100
Re: [PATCH] ixgbe: Wait for 1ms, not 1us, after RST Dan Streetman <dan.streetman@canonical.com> - 2015-10-27 19:00 +0100
Re: [PATCH] ixgbe: Wait for 1ms, not 1us, after RST Peter Hurley <peter@hurleysoftware.com> - 2015-10-27 19:00 +0100
[PATCHv2] ixgbe: Wait for 1ms, not 1us, after RST Dan Streetman <dan.streetman@canonical.com> - 2015-10-27 19:30 +0100
csiph-web