Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72898
b: refs/heads/master
c: 5a9147b
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Oct 30, 2007
1 parent ee223f9 commit cf99504
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3077d78a74a62c5f531b005efdbcc01a3f2f09ca
refs/heads/master: 5a9147bb29d76b30787638882f6c310074c2e6f3
4 changes: 2 additions & 2 deletions trunk/drivers/net/e1000e/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1680,8 +1680,8 @@ static int e1000_phys_id(struct net_device *netdev, u32 data)
{
struct e1000_adapter *adapter = netdev_priv(netdev);

if (!data || data > (u32)(MAX_SCHEDULE_TIMEOUT / HZ))
data = (u32)(MAX_SCHEDULE_TIMEOUT / HZ);
if (!data)
data = INT_MAX;

if (adapter->hw.phy.type == e1000_phy_ife) {
if (!adapter->blink_timer.function) {
Expand Down
35 changes: 18 additions & 17 deletions trunk/drivers/net/e1000e/param.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ MODULE_PARM_DESC(copybreak,
*/

#define E1000_PARAM_INIT { [0 ... E1000_MAX_NIC] = OPTION_UNSET }
#define E1000_PARAM(X, desc) \
static int __devinitdata X[E1000_MAX_NIC+1] = E1000_PARAM_INIT; \
static int num_##X; \
module_param_array_named(X, X, int, &num_##X, 0); \
#define E1000_PARAM(X, desc) \
static int __devinitdata X[E1000_MAX_NIC+1] \
= E1000_PARAM_INIT; \
static unsigned int num_##X; \
module_param_array_named(X, X, int, &num_##X, 0); \
MODULE_PARM_DESC(X, desc);


Expand Down Expand Up @@ -124,9 +125,9 @@ E1000_PARAM(KumeranLockLoss, "Enable Kumeran lock loss workaround");

struct e1000_option {
enum { enable_option, range_option, list_option } type;
char *name;
char *err;
int def;
const char *name;
const char *err;
int def;
union {
struct { /* range_option info */
int min;
Expand All @@ -139,8 +140,8 @@ struct e1000_option {
} arg;
};

static int __devinit e1000_validate_option(int *value,
struct e1000_option *opt,
static int __devinit e1000_validate_option(unsigned int *value,
const struct e1000_option *opt,
struct e1000_adapter *adapter)
{
if (*value == OPTION_UNSET) {
Expand Down Expand Up @@ -213,7 +214,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
}

{ /* Transmit Interrupt Delay */
struct e1000_option opt = {
const struct e1000_option opt = {
.type = range_option,
.name = "Transmit Interrupt Delay",
.err = "using default of "
Expand All @@ -232,7 +233,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
}
}
{ /* Transmit Absolute Interrupt Delay */
struct e1000_option opt = {
const struct e1000_option opt = {
.type = range_option,
.name = "Transmit Absolute Interrupt Delay",
.err = "using default of "
Expand Down Expand Up @@ -277,7 +278,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
}
}
{ /* Receive Absolute Interrupt Delay */
struct e1000_option opt = {
const struct e1000_option opt = {
.type = range_option,
.name = "Receive Absolute Interrupt Delay",
.err = "using default of "
Expand All @@ -296,7 +297,7 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
}
}
{ /* Interrupt Throttling Rate */
struct e1000_option opt = {
const struct e1000_option opt = {
.type = range_option,
.name = "Interrupt Throttling Rate (ints/sec)",
.err = "using default of "
Expand Down Expand Up @@ -344,31 +345,31 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter)
}
}
{ /* Smart Power Down */
struct e1000_option opt = {
const struct e1000_option opt = {
.type = enable_option,
.name = "PHY Smart Power Down",
.err = "defaulting to Disabled",
.def = OPTION_DISABLED
};

if (num_SmartPowerDownEnable > bd) {
int spd = SmartPowerDownEnable[bd];
unsigned int spd = SmartPowerDownEnable[bd];
e1000_validate_option(&spd, &opt, adapter);
if ((adapter->flags & FLAG_HAS_SMART_POWER_DOWN)
&& spd)
adapter->flags |= FLAG_SMART_POWER_DOWN;
}
}
{ /* Kumeran Lock Loss Workaround */
struct e1000_option opt = {
const struct e1000_option opt = {
.type = enable_option,
.name = "Kumeran Lock Loss Workaround",
.err = "defaulting to Enabled",
.def = OPTION_ENABLED
};

if (num_KumeranLockLoss > bd) {
int kmrn_lock_loss = KumeranLockLoss[bd];
unsigned int kmrn_lock_loss = KumeranLockLoss[bd];
e1000_validate_option(&kmrn_lock_loss, &opt, adapter);
if (hw->mac.type == e1000_ich8lan)
e1000e_set_kmrn_lock_loss_workaround_ich8lan(hw,
Expand Down

0 comments on commit cf99504

Please sign in to comment.