RE: [PATCH net-next v2] macb: Common code to enable ptp support for MACB/GEM

From: Rafal Ozieblo
Date: Thu Jan 26 2017 - 10:16:12 EST


> -----Original Message-----
> From: Andrei Pistirica [mailto:andrei.pistirica@xxxxxxxxxxxxx]
> Sent: 19 stycznia 2017 16:56
> Subject: [PATCH net-next v2] macb: Common code to enable ptp support for MACB/GEM
>
>
> +static inline bool gem_has_ptp(struct macb *bp)
> +{
> + return !!(bp->caps & MACB_CAPS_GEM_HAS_PTP);
> +}
Why don't you use hardware capabilities here? Would it be better to read it from hardware instead adding it to many configuration?