diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2008-09-01 07:49:02 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-03 09:53:48 -0400 |
commit | 8c8661e4cefdd1ddbfe7d5120f046694555d9e5c (patch) | |
tree | 0618e0392140bccadf012381e64a795dfe2e41a4 /drivers/net/sfc/bitfield.h | |
parent | a515089c963b045f65c495cee1d344d8cb75e1d1 (diff) |
sfc: Extend self-tests
Include PMA/PMD in loopback self-tests as intended.
Add NVRAM checksum validation and include it in self-tests.
Add register self-tests.
Run PHY self-tests where available.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/bitfield.h')
-rw-r--r-- | drivers/net/sfc/bitfield.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/net/sfc/bitfield.h b/drivers/net/sfc/bitfield.h index b757a39f078e..d95c21828014 100644 --- a/drivers/net/sfc/bitfield.h +++ b/drivers/net/sfc/bitfield.h | |||
@@ -416,12 +416,23 @@ typedef union efx_oword { | |||
416 | * for read-modify-write operations. | 416 | * for read-modify-write operations. |
417 | * | 417 | * |
418 | */ | 418 | */ |
419 | |||
420 | #define EFX_INVERT_OWORD(oword) do { \ | 419 | #define EFX_INVERT_OWORD(oword) do { \ |
421 | (oword).u64[0] = ~((oword).u64[0]); \ | 420 | (oword).u64[0] = ~((oword).u64[0]); \ |
422 | (oword).u64[1] = ~((oword).u64[1]); \ | 421 | (oword).u64[1] = ~((oword).u64[1]); \ |
423 | } while (0) | 422 | } while (0) |
424 | 423 | ||
424 | #define EFX_AND_OWORD(oword, from, mask) \ | ||
425 | do { \ | ||
426 | (oword).u64[0] = (from).u64[0] & (mask).u64[0]; \ | ||
427 | (oword).u64[1] = (from).u64[1] & (mask).u64[1]; \ | ||
428 | } while (0) | ||
429 | |||
430 | #define EFX_OR_OWORD(oword, from, mask) \ | ||
431 | do { \ | ||
432 | (oword).u64[0] = (from).u64[0] | (mask).u64[0]; \ | ||
433 | (oword).u64[1] = (from).u64[1] | (mask).u64[1]; \ | ||
434 | } while (0) | ||
435 | |||
425 | #define EFX_INSERT64(min, max, low, high, value) \ | 436 | #define EFX_INSERT64(min, max, low, high, value) \ |
426 | cpu_to_le64(EFX_INSERT_NATIVE(min, max, low, high, value)) | 437 | cpu_to_le64(EFX_INSERT_NATIVE(min, max, low, high, value)) |
427 | 438 | ||
@@ -529,4 +540,10 @@ typedef union efx_oword { | |||
529 | #define EFX_DMA_TYPE_WIDTH(width) \ | 540 | #define EFX_DMA_TYPE_WIDTH(width) \ |
530 | (((width) < DMA_ADDR_T_WIDTH) ? (width) : DMA_ADDR_T_WIDTH) | 541 | (((width) < DMA_ADDR_T_WIDTH) ? (width) : DMA_ADDR_T_WIDTH) |
531 | 542 | ||
543 | |||
544 | /* Static initialiser */ | ||
545 | #define EFX_OWORD32(a, b, c, d) \ | ||
546 | { .u32 = { __constant_cpu_to_le32(a), __constant_cpu_to_le32(b), \ | ||
547 | __constant_cpu_to_le32(c), __constant_cpu_to_le32(d) } } | ||
548 | |||
532 | #endif /* EFX_BITFIELD_H */ | 549 | #endif /* EFX_BITFIELD_H */ |