Merge branch 'for-next/net'
This commit is contained in:
commit
e188d2ec26
|
@ -33,41 +33,11 @@
|
|||
|
||||
static int at803x_config_init(struct phy_device *phydev)
|
||||
{
|
||||
int val;
|
||||
int ret;
|
||||
u32 features;
|
||||
|
||||
features = SUPPORTED_TP | SUPPORTED_MII | SUPPORTED_AUI |
|
||||
SUPPORTED_FIBRE | SUPPORTED_BNC;
|
||||
|
||||
val = phy_read(phydev, MII_BMSR);
|
||||
if (val < 0)
|
||||
return val;
|
||||
|
||||
if (val & BMSR_ANEGCAPABLE)
|
||||
features |= SUPPORTED_Autoneg;
|
||||
if (val & BMSR_100FULL)
|
||||
features |= SUPPORTED_100baseT_Full;
|
||||
if (val & BMSR_100HALF)
|
||||
features |= SUPPORTED_100baseT_Half;
|
||||
if (val & BMSR_10FULL)
|
||||
features |= SUPPORTED_10baseT_Full;
|
||||
if (val & BMSR_10HALF)
|
||||
features |= SUPPORTED_10baseT_Half;
|
||||
|
||||
if (val & BMSR_ESTATEN) {
|
||||
val = phy_read(phydev, MII_ESTATUS);
|
||||
if (val < 0)
|
||||
return val;
|
||||
|
||||
if (val & ESTATUS_1000_TFULL)
|
||||
features |= SUPPORTED_1000baseT_Full;
|
||||
if (val & ESTATUS_1000_THALF)
|
||||
features |= SUPPORTED_1000baseT_Half;
|
||||
}
|
||||
|
||||
phydev->supported = features;
|
||||
phydev->advertising = features;
|
||||
ret = genphy_config_init(phydev);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID) {
|
||||
ret = phy_write(phydev, AT803X_DEBUG_ADDR,
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#define PHY_AN_TIMEOUT 10
|
||||
|
||||
static struct phy_driver genphy_driver;
|
||||
static int genphy_config_init(struct phy_device *phydev);
|
||||
|
||||
/**
|
||||
* phy_aneg_done - return auto-negotiation status
|
||||
|
@ -806,7 +805,7 @@ void phy_write_mmd_indirect(struct phy_device *phydev, int prtad, int devad,
|
|||
phy_write(phydev, MII_MMD_DATA, data);
|
||||
}
|
||||
|
||||
static int genphy_config_init(struct phy_device *phydev)
|
||||
int genphy_config_init(struct phy_device *phydev)
|
||||
{
|
||||
int val;
|
||||
u32 features;
|
||||
|
|
6
fs/nfs.c
6
fs/nfs.c
|
@ -132,8 +132,8 @@ struct nfs_priv {
|
|||
struct net_connection *con;
|
||||
IPaddr_t server;
|
||||
char *path;
|
||||
unsigned short mount_port;
|
||||
unsigned short nfs_port;
|
||||
uint16_t mount_port;
|
||||
uint16_t nfs_port;
|
||||
uint32_t rpc_id;
|
||||
uint32_t rootfh_len;
|
||||
char rootfh[NFS3_FHSIZE];
|
||||
|
@ -1350,7 +1350,7 @@ static int nfs_probe(struct device_d *dev)
|
|||
|
||||
debug("nfs: server: %s path: %s\n", tmp, npriv->path);
|
||||
|
||||
npriv->con = net_udp_new(npriv->server, 0, nfs_handler, npriv);
|
||||
npriv->con = net_udp_new(npriv->server, SUNRPC_PORT, nfs_handler, npriv);
|
||||
if (IS_ERR(npriv->con)) {
|
||||
ret = PTR_ERR(npriv->con);
|
||||
goto err1;
|
||||
|
|
|
@ -75,7 +75,6 @@ struct file_priv {
|
|||
uint16_t last_block;
|
||||
int state;
|
||||
int err;
|
||||
int server_port;
|
||||
const char *filename;
|
||||
int filesize;
|
||||
uint64_t resend_timeout;
|
||||
|
@ -299,7 +298,6 @@ static void tftp_recv(struct file_priv *priv,
|
|||
|
||||
case TFTP_OACK:
|
||||
tftp_parse_oack(priv, pkt, len);
|
||||
priv->server_port = ntohs(uh_sport);
|
||||
priv->tftp_con->udp->uh_dport = uh_sport;
|
||||
|
||||
if (priv->push) {
|
||||
|
@ -322,7 +320,6 @@ static void tftp_recv(struct file_priv *priv,
|
|||
/* first block received */
|
||||
priv->state = STATE_RDATA;
|
||||
priv->tftp_con->udp->uh_dport = uh_sport;
|
||||
priv->server_port = ntohs(uh_sport);
|
||||
priv->last_block = 0;
|
||||
|
||||
if (priv->block != 1) { /* Assertion */
|
||||
|
|
|
@ -297,6 +297,7 @@ int phy_update_status(struct phy_device *phydev);
|
|||
int phy_wait_aneg_done(struct phy_device *phydev);
|
||||
|
||||
/* Generic PHY support and helper functions */
|
||||
int genphy_config_init(struct phy_device *phydev);
|
||||
int genphy_restart_aneg(struct phy_device *phydev);
|
||||
int genphy_config_aneg(struct phy_device *phydev);
|
||||
int genphy_aneg_done(struct phy_device *phydev);
|
||||
|
|
|
@ -445,7 +445,7 @@ struct net_connection *net_icmp_new(IPaddr_t dest, rx_handler_f *handler,
|
|||
|
||||
void net_unregister(struct net_connection *con);
|
||||
|
||||
static inline int net_udp_bind(struct net_connection *con, int sport)
|
||||
static inline int net_udp_bind(struct net_connection *con, uint16_t sport)
|
||||
{
|
||||
con->udp->uh_sport = ntohs(sport);
|
||||
return 0;
|
||||
|
|
|
@ -100,9 +100,17 @@ static void eth_drop_ethaddr(int ethid)
|
|||
void eth_register_ethaddr(int ethid, const char *ethaddr)
|
||||
{
|
||||
struct eth_ethaddr *addr;
|
||||
struct eth_device *edev;
|
||||
|
||||
eth_drop_ethaddr(ethid);
|
||||
|
||||
list_for_each_entry(edev, &netdev_list, list) {
|
||||
if (edev->dev.id == ethid) {
|
||||
register_preset_mac_address(edev, ethaddr);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
addr = xzalloc(sizeof(*addr));
|
||||
addr->ethid = ethid;
|
||||
memcpy(addr->ethaddr, ethaddr, 6);
|
||||
|
|
Loading…
Reference in New Issue