Skip to content

Commit 4567d68

Browse files
Volodymyr Bendiugadavem330
authored andcommitted
phy: increase size of MII_BUS_ID_SIZE and bus_id
Some bus names are pretty long and do not fit into 17 chars. Increase therefore MII_BUS_ID_SIZE and phy_fixup.bus_id to larger number. Now mii_bus.id can host larger name. Signed-off-by: Volodymyr Bendiuga <[email protected]> Signed-off-by: Magnus Öberg <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c2594d8 commit 4567d68

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

include/linux/phy.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,7 @@ static inline const char *phy_modes(phy_interface_t interface)
158158
/* Used when trying to connect to a specific phy (mii bus id:phy device id) */
159159
#define PHY_ID_FMT "%s:%02x"
160160

161-
/*
162-
* Need to be a little smaller than phydev->dev.bus_id to leave room
163-
* for the ":%02x"
164-
*/
165-
#define MII_BUS_ID_SIZE (20 - 3)
161+
#define MII_BUS_ID_SIZE 61
166162

167163
/* Or MII_ADDR_C45 into regnum for read/write on mii_bus to enable the 21 bit
168164
IEEE 802.3ae clause 45 addressing mode used by 10GIGE phy chips. */
@@ -632,7 +628,7 @@ struct phy_driver {
632628
/* A Structure for boards to register fixups with the PHY Lib */
633629
struct phy_fixup {
634630
struct list_head list;
635-
char bus_id[20];
631+
char bus_id[MII_BUS_ID_SIZE + 3];
636632
u32 phy_uid;
637633
u32 phy_uid_mask;
638634
int (*run)(struct phy_device *phydev);

0 commit comments

Comments
 (0)