sfc: Use DMA_BIT_MASK() instead of our own DMA mask macros
Also change type of efx_nic_type::max_dma_mask to u64, matching pci_dma_supported() parameter type. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
parent
5b9e207ced
commit
9bbd7d9a35
@ -501,8 +501,5 @@ typedef union efx_oword {
|
||||
#define DMA_ADDR_T_WIDTH (8 * sizeof(dma_addr_t))
|
||||
#define EFX_DMA_TYPE_WIDTH(width) \
|
||||
(((width) < DMA_ADDR_T_WIDTH) ? (width) : DMA_ADDR_T_WIDTH)
|
||||
#define EFX_DMA_MAX_MASK ((DMA_ADDR_T_WIDTH == 64) ? \
|
||||
~((u64) 0) : ~((u32) 0))
|
||||
#define EFX_DMA_MASK(mask) ((mask) & EFX_DMA_MAX_MASK)
|
||||
|
||||
#endif /* EFX_BITFIELD_H */
|
||||
|
@ -116,17 +116,8 @@ MODULE_PARM_DESC(rx_xon_thresh_bytes, "RX fifo XON threshold");
|
||||
**************************************************************************
|
||||
*/
|
||||
|
||||
/* DMA address mask (up to 46-bit, avoiding compiler warnings)
|
||||
*
|
||||
* Note that it is possible to have a platform with 64-bit longs and
|
||||
* 32-bit DMA addresses, or vice versa. EFX_DMA_MASK takes care of the
|
||||
* platform DMA mask.
|
||||
*/
|
||||
#if BITS_PER_LONG == 64
|
||||
#define FALCON_DMA_MASK EFX_DMA_MASK(0x00003fffffffffffUL)
|
||||
#else
|
||||
#define FALCON_DMA_MASK EFX_DMA_MASK(0x00003fffffffffffULL)
|
||||
#endif
|
||||
/* DMA address mask */
|
||||
#define FALCON_DMA_MASK DMA_BIT_MASK(46)
|
||||
|
||||
/* TX DMA length mask (13-bit) */
|
||||
#define FALCON_TX_DMA_MASK (4096 - 1)
|
||||
|
@ -800,7 +800,7 @@ struct efx_nic_type {
|
||||
unsigned int txd_ring_mask;
|
||||
unsigned int rxd_ring_mask;
|
||||
unsigned int evq_size;
|
||||
dma_addr_t max_dma_mask;
|
||||
u64 max_dma_mask;
|
||||
unsigned int tx_dma_mask;
|
||||
unsigned bug5391_mask;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user