diff options
author | Scott Feldman <scofeldm@cisco.com> | 2009-09-03 13:01:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-03 23:19:10 -0400 |
commit | 4badc385d1a9e140ad0992537237fc22211adad0 (patch) | |
tree | 5edf87f3240b4ad5c999e025c47d379f09f91296 /drivers/net/enic/vnic_dev.c | |
parent | 27e6c7d33835e7f347cdfb5025766b7d9a6596d1 (diff) |
enic: workaround A0 erratum
A0 revision ASIC has an erratum on the RQ desc cache on chip where the
cache can become corrupted causing pkt buf writes to wrong locations. The s/w
workaround is to post a dummy RQ desc in the ring every 32 descs, causing a
flush of the cache. A0 parts are not production, but there are enough of
these parts in the wild in test setups to warrant including workaround. A1
revision ASIC parts fix erratum.
Signed-off-by: Scott Feldman <scofeldm@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/enic/vnic_dev.c')
-rw-r--r-- | drivers/net/enic/vnic_dev.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/net/enic/vnic_dev.c b/drivers/net/enic/vnic_dev.c index d5c28efedd98..c8d3fc7517b0 100644 --- a/drivers/net/enic/vnic_dev.c +++ b/drivers/net/enic/vnic_dev.c | |||
@@ -349,6 +349,25 @@ int vnic_dev_fw_info(struct vnic_dev *vdev, | |||
349 | return err; | 349 | return err; |
350 | } | 350 | } |
351 | 351 | ||
352 | int vnic_dev_hw_version(struct vnic_dev *vdev, enum vnic_dev_hw_version *hw_ver) | ||
353 | { | ||
354 | struct vnic_devcmd_fw_info *fw_info; | ||
355 | int err; | ||
356 | |||
357 | err = vnic_dev_fw_info(vdev, &fw_info); | ||
358 | if (err) | ||
359 | return err; | ||
360 | |||
361 | if (strncmp(fw_info->hw_version, "A1", sizeof("A1")) == 0) | ||
362 | *hw_ver = VNIC_DEV_HW_VER_A1; | ||
363 | else if (strncmp(fw_info->hw_version, "A2", sizeof("A2")) == 0) | ||
364 | *hw_ver = VNIC_DEV_HW_VER_A2; | ||
365 | else | ||
366 | *hw_ver = VNIC_DEV_HW_VER_UNKNOWN; | ||
367 | |||
368 | return 0; | ||
369 | } | ||
370 | |||
352 | int vnic_dev_spec(struct vnic_dev *vdev, unsigned int offset, unsigned int size, | 371 | int vnic_dev_spec(struct vnic_dev *vdev, unsigned int offset, unsigned int size, |
353 | void *value) | 372 | void *value) |
354 | { | 373 | { |