Commit ae0b9530 authored by Chad Williamson's avatar Chad Williamson Committed by Greg Kroah-Hartman

Staging: silicom: capitalize labels in the bp_media_type enum

Capitalize the names of the media types in enum bp_media_type in
bpctl_mod.c, as is the preffered style.
Signed-off-by: default avatarChad Williamson <chad@dahc.us>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ff2e54cd
...@@ -53,10 +53,10 @@ if (down_interruptible(&bpctl_sema)) { \ ...@@ -53,10 +53,10 @@ if (down_interruptible(&bpctl_sema)) { \
/* Media Types */ /* Media Types */
enum bp_media_type { enum bp_media_type {
bp_copper = 0, BP_COPPER = 0,
bp_fiber, BP_FIBER,
bp_cx4, BP_CX4,
bp_none, BP_NONE,
}; };
struct bypass_pfs_sd { struct bypass_pfs_sd {
...@@ -3400,7 +3400,7 @@ static int bypass_status(bpctl_dev_t *pbpctl_dev) ...@@ -3400,7 +3400,7 @@ static int bypass_status(bpctl_dev_t *pbpctl_dev)
BP10G_SDP7_DATA_IN) != 0 ? 0 : 1); BP10G_SDP7_DATA_IN) != 0 ? 0 : 1);
} }
} else if (pbpctl_dev->media_type == bp_copper) { } else if (pbpctl_dev->media_type == BP_COPPER) {
return (((BPCTL_READ_REG(pbpctl_dev_b, CTRL)) & return (((BPCTL_READ_REG(pbpctl_dev_b, CTRL)) &
BPCTLI_CTRL_SWDPIN1) != 0 ? 1 : 0); BPCTLI_CTRL_SWDPIN1) != 0 ? 1 : 0);
...@@ -3646,7 +3646,7 @@ int tap_status(bpctl_dev_t *pbpctl_dev) ...@@ -3646,7 +3646,7 @@ int tap_status(bpctl_dev_t *pbpctl_dev)
BP10G_SDP6_DATA_IN) != 0 ? 0 : 1); BP10G_SDP6_DATA_IN) != 0 ? 0 : 1);
} }
} else if (pbpctl_dev->media_type == bp_copper) } else if (pbpctl_dev->media_type == BP_COPPER)
return (((BPCTL_READ_REG(pbpctl_dev, CTRL)) & return (((BPCTL_READ_REG(pbpctl_dev, CTRL)) &
BPCTLI_CTRL_SWDPIN0) != 0 ? 1 : 0); BPCTLI_CTRL_SWDPIN0) != 0 ? 1 : 0);
else { else {
...@@ -3741,7 +3741,7 @@ int disc_off_status(bpctl_dev_t *pbpctl_dev) ...@@ -3741,7 +3741,7 @@ int disc_off_status(bpctl_dev_t *pbpctl_dev)
BP10G_SDP2_DATA) != 0 ? 1 : 0); BP10G_SDP2_DATA) != 0 ? 1 : 0);
} }
if (pbpctl_dev->media_type == bp_copper) { if (pbpctl_dev->media_type == BP_COPPER) {
#if 0 #if 0
return ((((read_reg(pbpctl_dev, STATUS_DISC_REG_ADDR)) & return ((((read_reg(pbpctl_dev, STATUS_DISC_REG_ADDR)) &
...@@ -4032,36 +4032,36 @@ void bypass_caps_init(bpctl_dev_t *pbpctl_dev) ...@@ -4032,36 +4032,36 @@ void bypass_caps_init(bpctl_dev_t *pbpctl_dev)
} }
#endif #endif
if ((pbpctl_dev->bp_fiber5) || (pbpctl_dev->bp_10g9)) { if ((pbpctl_dev->bp_fiber5) || (pbpctl_dev->bp_10g9)) {
pbpctl_dev->media_type = bp_fiber; pbpctl_dev->media_type = BP_FIBER;
} else if (pbpctl_dev->bp_10gb) { } else if (pbpctl_dev->bp_10gb) {
if (BP10GB_CX4_SERIES(pbpctl_dev->subdevice)) if (BP10GB_CX4_SERIES(pbpctl_dev->subdevice))
pbpctl_dev->media_type = bp_cx4; pbpctl_dev->media_type = BP_CX4;
else else
pbpctl_dev->media_type = bp_fiber; pbpctl_dev->media_type = BP_FIBER;
} }
else if (pbpctl_dev->bp_540) else if (pbpctl_dev->bp_540)
pbpctl_dev->media_type = bp_none; pbpctl_dev->media_type = BP_NONE;
else if (!pbpctl_dev->bp_10g) { else if (!pbpctl_dev->bp_10g) {
ctrl_ext = BPCTL_READ_REG(pbpctl_dev, CTRL_EXT); ctrl_ext = BPCTL_READ_REG(pbpctl_dev, CTRL_EXT);
if ((ctrl_ext & BPCTLI_CTRL_EXT_LINK_MODE_MASK) == 0x0) if ((ctrl_ext & BPCTLI_CTRL_EXT_LINK_MODE_MASK) == 0x0)
pbpctl_dev->media_type = bp_copper; pbpctl_dev->media_type = BP_COPPER;
else else
pbpctl_dev->media_type = bp_fiber; pbpctl_dev->media_type = BP_FIBER;
} else { } else {
if (BP10G_CX4_SERIES(pbpctl_dev->subdevice)) if (BP10G_CX4_SERIES(pbpctl_dev->subdevice))
pbpctl_dev->media_type = bp_cx4; pbpctl_dev->media_type = BP_CX4;
else else
pbpctl_dev->media_type = bp_fiber; pbpctl_dev->media_type = BP_FIBER;
} }
if (is_bypass_fn(pbpctl_dev)) { if (is_bypass_fn(pbpctl_dev)) {
pbpctl_dev->bp_caps |= BP_PWOFF_ON_CAP; pbpctl_dev->bp_caps |= BP_PWOFF_ON_CAP;
if (pbpctl_dev->media_type == bp_fiber) if (pbpctl_dev->media_type == BP_FIBER)
pbpctl_dev->bp_caps |= pbpctl_dev->bp_caps |=
(TX_CTL_CAP | TX_STATUS_CAP | TPL_CAP); (TX_CTL_CAP | TX_STATUS_CAP | TPL_CAP);
...@@ -5030,7 +5030,7 @@ static int get_bypass_link_status(bpctl_dev_t *pbpctl_dev) ...@@ -5030,7 +5030,7 @@ static int get_bypass_link_status(bpctl_dev_t *pbpctl_dev)
if (!pbpctl_dev) if (!pbpctl_dev)
return -1; return -1;
if (pbpctl_dev->media_type == bp_fiber) if (pbpctl_dev->media_type == BP_FIBER)
return ((BPCTL_READ_REG(pbpctl_dev, CTRL) & return ((BPCTL_READ_REG(pbpctl_dev, CTRL) &
BPCTLI_CTRL_SWDPIN1)); BPCTLI_CTRL_SWDPIN1));
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment