ChangeSet 1.2028, 2005/03/08 15:46:55-05:00, [EMAIL PROTECTED]
Merge pobox.com:/garz/repo/linux-2.6
into pobox.com:/garz/repo/netdev-2.6/janitor
amd8111e.c | 4 +-
bonding/bond_alb.c | 8 ++--
eepro100.c | 10 -----
ioc3-eth.c | 82 +++++++++++++++++++++++++++++++++++++------
pppoe.c | 101 ++++++++++++++++++++---------------------------------
s2io.c | 75 ++++++++++++++++-----------------------
via-rhine.c | 2 -
via-velocity.c | 2 -
8 files changed, 149 insertions(+), 135 deletions(-)
diff -Nru a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c
--- a/drivers/net/amd8111e.c 2005-03-09 11:18:53 -08:00
+++ b/drivers/net/amd8111e.c 2005-03-09 11:18:53 -08:00
@@ -1489,7 +1489,7 @@
amd8111e crc generator implementation is different from the kernel
ether_crc() function.
*/
-int amd8111e_ether_crc(int len, char* mac_addr)
+static int amd8111e_ether_crc(int len, char* mac_addr)
{
int i,byte;
unsigned char octet;
@@ -1717,7 +1717,7 @@
/*
This function changes the mtu of the device. It restarts the device to
initialize the descriptor with new receive buffers.
*/
-int amd8111e_change_mtu(struct net_device *dev, int new_mtu)
+static int amd8111e_change_mtu(struct net_device *dev, int new_mtu)
{
struct amd8111e_priv *lp = netdev_priv(dev);
int err;
diff -Nru a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
--- a/drivers/net/bonding/bond_alb.c 2005-03-09 11:18:53 -08:00
+++ b/drivers/net/bonding/bond_alb.c 2005-03-09 11:18:53 -08:00
@@ -954,9 +954,9 @@
/* each slave will receive packets destined to a different mac */
memcpy(s_addr.sa_data, addr, dev->addr_len);
s_addr.sa_family = dev->type;
- if (dev->set_mac_address(dev, &s_addr)) {
+ if (dev_set_mac_address(dev, &s_addr)) {
printk(KERN_ERR DRV_NAME
- ": Error: dev->set_mac_address of dev %s failed! ALB "
+ ": Error: dev_set_mac_address of dev %s failed! ALB "
"mode requires that the base driver support setting "
"the hw address also when the network device's "
"interface is open\n",
@@ -1209,7 +1209,7 @@
/* save net_device's current hw address */
memcpy(tmp_addr, slave->dev->dev_addr, ETH_ALEN);
- res = slave->dev->set_mac_address(slave->dev, addr);
+ res = dev_set_mac_address(slave->dev, addr);
/* restore net_device's hw address */
memcpy(slave->dev->dev_addr, tmp_addr, ETH_ALEN);
@@ -1229,7 +1229,7 @@
stop_at = slave;
bond_for_each_slave_from_to(bond, slave, i, bond->first_slave, stop_at)
{
memcpy(tmp_addr, slave->dev->dev_addr, ETH_ALEN);
- slave->dev->set_mac_address(slave->dev, &sa);
+ dev_set_mac_address(slave->dev, &sa);
memcpy(slave->dev->dev_addr, tmp_addr, ETH_ALEN);
}
diff -Nru a/drivers/net/eepro100.c b/drivers/net/eepro100.c
--- a/drivers/net/eepro100.c 2005-03-09 11:18:53 -08:00
+++ b/drivers/net/eepro100.c 2005-03-09 11:18:53 -08:00
@@ -152,16 +152,6 @@
#define RUN_AT(x) (jiffies + (x))
-/* ACPI power states don't universally work (yet) */
-#ifndef CONFIG_PM
-#undef pci_set_power_state
-#define pci_set_power_state null_set_power_state
-static inline int null_set_power_state(struct pci_dev *dev, int state)
-{
- return 0;
-}
-#endif /* CONFIG_PM */
-
#define netdevice_start(dev)
#define netdevice_stop(dev)
#define netif_set_tx_timeout(dev, tf, tm) \
diff -Nru a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c
--- a/drivers/net/ioc3-eth.c 2005-03-09 11:18:53 -08:00
+++ b/drivers/net/ioc3-eth.c 2005-03-09 11:18:53 -08:00
@@ -462,6 +462,29 @@
printk(".\n");
}
+static void __ioc3_set_mac_address(struct net_device *dev)
+{
+ struct ioc3_private *ip = netdev_priv(dev);
+ struct ioc3 *ioc3 = ip->regs;
+
+ ioc3_w_emar_h((dev->dev_addr[5] << 8) | dev->dev_addr[4]);
+ ioc3_w_emar_l((dev->dev_addr[3] << 24) | (dev->dev_addr[2] << 16) |
+ (dev->dev_addr[1] << 8) | dev->dev_addr[0]);
+}
+
+static int ioc3_set_mac_address(struct net_device *dev, void *addr)
+{
+ struct ioc3_private *ip = netdev_priv(dev);
+ struct sockaddr *sa = addr;
+
+ memcpy(dev->dev_addr, sa->sa_data, dev->addr_len);
+
+ spin_lock_irq(&ip->ioc3_lock);
+ __ioc3_set_mac_address(dev);
+ spin_unlock_irq(&ip->ioc3_lock);
+
+ return 0;
+}
/*
* Caller must hold the ioc3_lock ever for MII readers. This is also
@@ -1013,9 +1036,7 @@
(void) ioc3_r_etcdc(); /* Clear on read */
ioc3_w_ercsr(15); /* RX low watermark */
ioc3_w_ertr(0); /* Interrupt immediately */
- ioc3_w_emar_h((dev->dev_addr[5] << 8) | dev->dev_addr[4]);
- ioc3_w_emar_l((dev->dev_addr[3] << 24) | (dev->dev_addr[2] << 16) |
- (dev->dev_addr[1] << 8) | dev->dev_addr[0]);
+ __ioc3_set_mac_address(dev);
ioc3_w_ehar_h(ip->ehar_h);
ioc3_w_ehar_l(ip->ehar_l);
ioc3_w_ersr(42); /* XXX should be random */
@@ -1099,6 +1120,7 @@
&& dev->device == PCI_DEVICE_ID_SGI_IOC3;
}
+#ifdef CONFIG_SERIAL_8250
/*
* Note about serial ports and consoles:
* For console output, everyone uses the IOC3 UARTA (offset 0x178)
@@ -1120,15 +1142,14 @@
* "device" routine referred to in this console structure
* (ip27prom_console_dev).
*
- * Also look in ip27-pci.c:pci_fixuop_ioc3() for some comments on working
+ * Also look in ip27-pci.c:pci_fixup_ioc3() for some comments on working
* around ioc3 oddities in this respect.
*
* The IOC3 serials use a 22MHz clock rate with an additional divider by 3.
* (IOC3_BAUD = (22000000 / (3*16)))
*/
-static inline void ioc3_serial_probe(struct pci_dev *pdev,
- struct ioc3 *ioc3)
+static void __devinit ioc3_serial_probe(struct pci_dev *pdev, struct ioc3
*ioc3)
{
struct serial_struct req;
@@ -1159,9 +1180,9 @@
req.iomem_base = (unsigned char *) &ioc3->sregs.uartb;
register_serial(&req);
}
+#endif
-static int __devinit ioc3_probe(struct pci_dev *pdev,
- const struct pci_device_id *ent)
+static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
{
unsigned int sw_physid1, sw_physid2;
struct net_device *dev = NULL;
@@ -1169,11 +1190,39 @@
struct ioc3 *ioc3;
unsigned long ioc3_base, ioc3_size;
u32 vendor, model, rev;
- int err;
+ int err, pci_using_dac;
+
+ /* Configure DMA attributes. */
+ err = pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
+ if (!err) {
+ pci_using_dac = 1;
+ err = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL);
+ if (err < 0) {
+ printk(KERN_ERR "%s: Unable to obtain 64 bit DMA "
+ "for consistent allocations\n", pci_name(pdev));
+ goto out;
+ }
+ } else {
+ err = pci_set_dma_mask(pdev, 0xffffffffULL);
+ if (err) {
+ printk(KERN_ERR "%s: No usable DMA configuration, "
+ "aborting.\n", pci_name(pdev));
+ goto out;
+ }
+ pci_using_dac = 0;
+ }
+
+ if (pci_enable_device(pdev))
+ return -ENODEV;
dev = alloc_etherdev(sizeof(struct ioc3_private));
- if (!dev)
- return -ENOMEM;
+ if (!dev) {
+ err = -ENOMEM;
+ goto out_disable;
+ }
+
+ if (pci_using_dac)
+ dev->features |= NETIF_F_HIGHDMA;
err = pci_request_regions(pdev, "ioc3");
if (err)
@@ -1236,6 +1285,7 @@
dev->get_stats = ioc3_get_stats;
dev->do_ioctl = ioc3_ioctl;
dev->set_multicast_list = ioc3_set_multicast_list;
+ dev->set_mac_address = ioc3_set_mac_address;
dev->ethtool_ops = &ioc3_ethtool_ops;
#ifdef CONFIG_SGI_IOC3_ETH_HW_TX_CSUM
dev->features = NETIF_F_IP_CSUM;
@@ -1268,6 +1318,12 @@
pci_release_regions(pdev);
out_free:
free_netdev(dev);
+out_disable:
+ /*
+ * We should call pci_disable_device(pdev); here if the IOC3 wasn't
+ * such a weird device ...
+ */
+out:
return err;
}
@@ -1281,6 +1337,10 @@
iounmap(ioc3);
pci_release_regions(pdev);
free_netdev(dev);
+ /*
+ * We should call pci_disable_device(pdev); here if the IOC3 wasn't
+ * such a weird device ...
+ */
}
static struct pci_device_id ioc3_pci_tbl[] = {
diff -Nru a/drivers/net/pppoe.c b/drivers/net/pppoe.c
--- a/drivers/net/pppoe.c 2005-03-09 11:18:53 -08:00
+++ b/drivers/net/pppoe.c 2005-03-09 11:18:53 -08:00
@@ -120,17 +120,17 @@
}
/* zeroed because its in .bss */
-static struct pppox_opt *item_hash_table[PPPOE_HASH_SIZE];
+static struct pppox_sock *item_hash_table[PPPOE_HASH_SIZE];
/**********************************************************************
*
* Set/get/delete/rehash items (internal versions)
*
**********************************************************************/
-static struct pppox_opt *__get_item(unsigned long sid, unsigned char *addr)
+static struct pppox_sock *__get_item(unsigned long sid, unsigned char *addr)
{
int hash = hash_item(sid, addr);
- struct pppox_opt *ret;
+ struct pppox_sock *ret;
ret = item_hash_table[hash];
@@ -140,10 +140,10 @@
return ret;
}
-static int __set_item(struct pppox_opt *po)
+static int __set_item(struct pppox_sock *po)
{
int hash = hash_item(po->pppoe_pa.sid, po->pppoe_pa.remote);
- struct pppox_opt *ret;
+ struct pppox_sock *ret;
ret = item_hash_table[hash];
while (ret) {
@@ -161,10 +161,10 @@
return 0;
}
-static struct pppox_opt *__delete_item(unsigned long sid, char *addr)
+static struct pppox_sock *__delete_item(unsigned long sid, char *addr)
{
int hash = hash_item(sid, addr);
- struct pppox_opt *ret, **src;
+ struct pppox_sock *ret, **src;
ret = item_hash_table[hash];
src = &item_hash_table[hash];
@@ -187,26 +187,26 @@
* Set/get/delete/rehash items
*
**********************************************************************/
-static inline struct pppox_opt *get_item(unsigned long sid,
+static inline struct pppox_sock *get_item(unsigned long sid,
unsigned char *addr)
{
- struct pppox_opt *po;
+ struct pppox_sock *po;
read_lock_bh(&pppoe_hash_lock);
po = __get_item(sid, addr);
if (po)
- sock_hold(po->sk);
+ sock_hold(sk_pppox(po));
read_unlock_bh(&pppoe_hash_lock);
return po;
}
-static inline struct pppox_opt *get_item_by_addr(struct sockaddr_pppox *sp)
+static inline struct pppox_sock *get_item_by_addr(struct sockaddr_pppox *sp)
{
return get_item(sp->sa_addr.pppoe.sid, sp->sa_addr.pppoe.remote);
}
-static inline int set_item(struct pppox_opt *po)
+static inline int set_item(struct pppox_sock *po)
{
int i;
@@ -220,9 +220,9 @@
return i;
}
-static inline struct pppox_opt *delete_item(unsigned long sid, char *addr)
+static inline struct pppox_sock *delete_item(unsigned long sid, char *addr)
{
- struct pppox_opt *ret;
+ struct pppox_sock *ret;
write_lock_bh(&pppoe_hash_lock);
ret = __delete_item(sid, addr);
@@ -248,11 +248,11 @@
read_lock_bh(&pppoe_hash_lock);
for (hash = 0; hash < PPPOE_HASH_SIZE; hash++) {
- struct pppox_opt *po = item_hash_table[hash];
+ struct pppox_sock *po = item_hash_table[hash];
while (po != NULL) {
if (po->pppoe_dev == dev) {
- struct sock *sk = po->sk;
+ struct sock *sk = sk_pppox(po);
sock_hold(sk);
po->pppoe_dev = NULL;
@@ -331,8 +331,8 @@
***********************************************************************/
static int pppoe_rcv_core(struct sock *sk, struct sk_buff *skb)
{
- struct pppox_opt *po = pppox_sk(sk);
- struct pppox_opt *relay_po = NULL;
+ struct pppox_sock *po = pppox_sk(sk);
+ struct pppox_sock *relay_po = NULL;
if (sk->sk_state & PPPOX_BOUND) {
struct pppoe_hdr *ph = (struct pppoe_hdr *) skb->nh.raw;
@@ -347,11 +347,11 @@
if (relay_po == NULL)
goto abort_kfree;
- if ((relay_po->sk->sk_state & PPPOX_CONNECTED) == 0)
+ if ((sk_pppox(relay_po)->sk_state & PPPOX_CONNECTED) == 0)
goto abort_put;
skb_pull(skb, sizeof(struct pppoe_hdr));
- if (!__pppoe_xmit( relay_po->sk, skb))
+ if (!__pppoe_xmit(sk_pppox(relay_po), skb))
goto abort_put;
} else {
if (sock_queue_rcv_skb(sk, skb))
@@ -361,7 +361,7 @@
return NET_RX_SUCCESS;
abort_put:
- sock_put(relay_po->sk);
+ sock_put(sk_pppox(relay_po));
abort_kfree:
kfree_skb(skb);
@@ -379,7 +379,7 @@
{
struct pppoe_hdr *ph;
- struct pppox_opt *po;
+ struct pppox_sock *po;
struct sock *sk;
int ret;
@@ -395,7 +395,7 @@
if (!po)
goto drop;
- sk = po->sk;
+ sk = sk_pppox(po);
bh_lock_sock(sk);
/* Socket state is unknown, must put skb into backlog. */
@@ -428,7 +428,7 @@
{
struct pppoe_hdr *ph;
- struct pppox_opt *po;
+ struct pppox_sock *po;
if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr)))
goto abort;
@@ -442,7 +442,7 @@
po = get_item((unsigned long) ph->sid, eth_hdr(skb)->h_source);
if (po) {
- struct sock *sk = po->sk;
+ struct sock *sk = sk_pppox(po);
bh_lock_sock(sk);
@@ -480,20 +480,6 @@
/***********************************************************************
*
- * Really kill the socket. (Called from pppox_sk_free if refcnt == 0.)
- *
- **********************************************************************/
-static void pppoe_sk_free(struct sock *sk)
-{
- struct pppox_opt *po = pppox_sk(sk);
-
- if (po)
- kfree(po);
-}
-
-
-/***********************************************************************
- *
* Initialize a new struct sock.
*
**********************************************************************/
@@ -501,9 +487,8 @@
{
int error = -ENOMEM;
struct sock *sk;
- struct pppox_opt *po;
- sk = sk_alloc(PF_PPPOX, GFP_KERNEL, 1, NULL);
+ sk = sk_alloc(PF_PPPOX, GFP_KERNEL, sizeof(struct pppox_sock), NULL);
if (!sk)
goto out;
@@ -517,23 +502,15 @@
sk->sk_type = SOCK_STREAM;
sk->sk_family = PF_PPPOX;
sk->sk_protocol = PX_PROTO_OE;
- sk->sk_destruct = pppoe_sk_free;
- po = sk->sk_protinfo = kmalloc(sizeof(*po), GFP_KERNEL);
- if (!po)
- goto frees;
- memset(po, 0, sizeof(*po));
- po->sk = sk;
error = 0;
out: return error;
-frees: sk_free(sk);
- goto out;
}
static int pppoe_release(struct socket *sock)
{
struct sock *sk = sock->sk;
- struct pppox_opt *po;
+ struct pppox_sock *po;
int error = 0;
if (!sk)
@@ -573,7 +550,7 @@
struct sock *sk = sock->sk;
struct net_device *dev = NULL;
struct sockaddr_pppox *sp = (struct sockaddr_pppox *) uservaddr;
- struct pppox_opt *po = pppox_sk(sk);
+ struct pppox_sock *po = pppox_sk(sk);
int error;
lock_sock(sk);
@@ -602,8 +579,8 @@
if(po->pppoe_dev)
dev_put(po->pppoe_dev);
- memset(po, 0, sizeof(struct pppox_opt));
- po->sk = sk;
+ memset(sk_pppox(po) + 1, 0,
+ sizeof(struct pppox_sock) - sizeof(struct sock));
sk->sk_state = PPPOX_NONE;
}
@@ -679,7 +656,7 @@
unsigned long arg)
{
struct sock *sk = sock->sk;
- struct pppox_opt *po = pppox_sk(sk);
+ struct pppox_sock *po = pppox_sk(sk);
int val = 0;
int err = 0;
@@ -725,7 +702,7 @@
case PPPOEIOCSFWD:
{
- struct pppox_opt *relay_po;
+ struct pppox_sock *relay_po;
err = -EBUSY;
if (sk->sk_state & (PPPOX_BOUND | PPPOX_ZOMBIE | PPPOX_DEAD))
@@ -755,7 +732,7 @@
if (!relay_po)
break;
- sock_put(relay_po->sk);
+ sock_put(sk_pppox(relay_po));
sk->sk_state |= PPPOX_RELAY;
err = 0;
break;
@@ -782,7 +759,7 @@
{
struct sk_buff *skb = NULL;
struct sock *sk = sock->sk;
- struct pppox_opt *po = pppox_sk(sk);
+ struct pppox_sock *po = pppox_sk(sk);
int error = 0;
struct pppoe_hdr hdr;
struct pppoe_hdr *ph;
@@ -857,7 +834,7 @@
***********************************************************************/
static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb)
{
- struct pppox_opt *po = pppox_sk(sk);
+ struct pppox_sock *po = pppox_sk(sk);
struct net_device *dev = po->pppoe_dev;
struct pppoe_hdr hdr;
struct pppoe_hdr *ph;
@@ -984,7 +961,7 @@
#ifdef CONFIG_PROC_FS
static int pppoe_seq_show(struct seq_file *seq, void *v)
{
- struct pppox_opt *po;
+ struct pppox_sock *po;
char *dev_name;
if (v == SEQ_START_TOKEN) {
@@ -1004,9 +981,9 @@
return 0;
}
-static __inline__ struct pppox_opt *pppoe_get_idx(loff_t pos)
+static __inline__ struct pppox_sock *pppoe_get_idx(loff_t pos)
{
- struct pppox_opt *po = NULL;
+ struct pppox_sock *po = NULL;
int i = 0;
for (; i < PPPOE_HASH_SIZE; i++) {
@@ -1031,7 +1008,7 @@
static void *pppoe_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
- struct pppox_opt *po;
+ struct pppox_sock *po;
++*pos;
if (v == SEQ_START_TOKEN) {
diff -Nru a/drivers/net/s2io.c b/drivers/net/s2io.c
--- a/drivers/net/s2io.c 2005-03-09 11:18:53 -08:00
+++ b/drivers/net/s2io.c 2005-03-09 11:18:53 -08:00
@@ -1350,7 +1350,7 @@
*
*/
-void fix_mac_address(nic_t * sp)
+static void fix_mac_address(nic_t * sp)
{
XENA_dev_config_t __iomem *bar0 = sp->bar0;
u64 val64;
@@ -1506,7 +1506,7 @@
* Return Value: void
*/
-void free_tx_buffers(struct s2io_nic *nic)
+static void free_tx_buffers(struct s2io_nic *nic)
{
struct net_device *dev = nic->dev;
struct sk_buff *skb;
@@ -1597,7 +1597,7 @@
* SUCCESS on success or an appropriate -ve value on failure.
*/
-int fill_rx_buffers(struct s2io_nic *nic, int ring_no)
+static int fill_rx_buffers(struct s2io_nic *nic, int ring_no)
{
struct net_device *dev = nic->dev;
struct sk_buff *skb;
@@ -2422,7 +2422,7 @@
* SUCCESS on success and FAILURE on failure.
*/
-int wait_for_cmd_complete(nic_t * sp)
+static int wait_for_cmd_complete(nic_t * sp)
{
XENA_dev_config_t __iomem *bar0 = sp->bar0;
int ret = FAILURE, cnt = 0;
@@ -2452,7 +2452,7 @@
* void.
*/
-void s2io_reset(nic_t * sp)
+static void s2io_reset(nic_t * sp)
{
XENA_dev_config_t __iomem *bar0 = sp->bar0;
u64 val64;
@@ -2504,7 +2504,7 @@
* SUCCESS on success and FAILURE on failure.
*/
-int s2io_set_swapper(nic_t * sp)
+static int s2io_set_swapper(nic_t * sp)
{
struct net_device *dev = sp->dev;
XENA_dev_config_t __iomem *bar0 = sp->bar0;
@@ -2598,7 +2598,7 @@
* file on failure.
*/
-int s2io_open(struct net_device *dev)
+static int s2io_open(struct net_device *dev)
{
nic_t *sp = dev->priv;
int err = 0;
@@ -2650,7 +2650,7 @@
* file on failure.
*/
-int s2io_close(struct net_device *dev)
+static int s2io_close(struct net_device *dev)
{
nic_t *sp = dev->priv;
@@ -2677,7 +2677,7 @@
* 0 on success & 1 on failure.
*/
-int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
+static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
{
nic_t *sp = dev->priv;
u16 frg_cnt, frg_len, i, queue, queue_len, put_off, get_off;
@@ -2897,7 +2897,7 @@
* pointer to the updated net_device_stats structure.
*/
-struct net_device_stats *s2io_get_stats(struct net_device *dev)
+static struct net_device_stats *s2io_get_stats(struct net_device *dev)
{
nic_t *sp = dev->priv;
mac_info_t *mac_control;
@@ -3150,7 +3150,7 @@
* return 0 on success.
*/
-int s2io_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info)
+static int s2io_ethtool_gset(struct net_device *dev, struct ethtool_cmd *info)
{
nic_t *sp = dev->priv;
info->supported = (SUPPORTED_10000baseT_Full | SUPPORTED_FIBRE);
@@ -3347,8 +3347,8 @@
* int, returns 0 on Success
*/
-int s2io_ethtool_setpause_data(struct net_device *dev,
- struct ethtool_pauseparam *ep)
+static int s2io_ethtool_setpause_data(struct net_device *dev,
+ struct ethtool_pauseparam *ep)
{
u64 val64;
nic_t *sp = dev->priv;
@@ -3463,8 +3463,8 @@
* int 0 on success
*/
-int s2io_ethtool_geeprom(struct net_device *dev,
- struct ethtool_eeprom *eeprom, u8 * data_buf)
+static int s2io_ethtool_geeprom(struct net_device *dev,
+ struct ethtool_eeprom *eeprom, u8 * data_buf)
{
u32 data, i, valid;
nic_t *sp = dev->priv;
@@ -3961,19 +3961,20 @@
tmp_stats[i++] = stat_info->rmac_err_tcp;
}
-int s2io_ethtool_get_regs_len(struct net_device *dev)
+static int s2io_ethtool_get_regs_len(struct net_device *dev)
{
return (XENA_REG_SPACE);
}
-u32 s2io_ethtool_get_rx_csum(struct net_device * dev)
+static u32 s2io_ethtool_get_rx_csum(struct net_device * dev)
{
nic_t *sp = dev->priv;
return (sp->rx_csum);
}
-int s2io_ethtool_set_rx_csum(struct net_device *dev, u32 data)
+
+static int s2io_ethtool_set_rx_csum(struct net_device *dev, u32 data)
{
nic_t *sp = dev->priv;
@@ -3984,17 +3985,19 @@
return 0;
}
-int s2io_get_eeprom_len(struct net_device *dev)
+
+static int s2io_get_eeprom_len(struct net_device *dev)
{
return (XENA_EEPROM_SPACE);
}
-int s2io_ethtool_self_test_count(struct net_device *dev)
+static int s2io_ethtool_self_test_count(struct net_device *dev)
{
return (S2IO_TEST_LEN);
}
-void s2io_ethtool_get_strings(struct net_device *dev,
- u32 stringset, u8 * data)
+
+static void s2io_ethtool_get_strings(struct net_device *dev,
+ u32 stringset, u8 * data)
{
switch (stringset) {
case ETH_SS_TEST:
@@ -4005,12 +4008,13 @@
sizeof(ethtool_stats_keys));
}
}
+
static int s2io_ethtool_get_stats_count(struct net_device *dev)
{
return (S2IO_STAT_LEN);
}
-int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data)
+static int s2io_ethtool_op_set_tx_csum(struct net_device *dev, u32 data)
{
if (data)
dev->features |= NETIF_F_IP_CSUM;
@@ -4066,7 +4070,7 @@
* function returns OP NOT SUPPORTED value.
*/
-int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
+static int s2io_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
return -EOPNOTSUPP;
}
@@ -4082,7 +4086,7 @@
* file on failure.
*/
-int s2io_change_mtu(struct net_device *dev, int new_mtu)
+static int s2io_change_mtu(struct net_device *dev, int new_mtu)
{
nic_t *sp = dev->priv;
XENA_dev_config_t __iomem *bar0 = sp->bar0;
@@ -4476,7 +4480,7 @@
* void.
*/
-void s2io_link(nic_t * sp, int link)
+static void s2io_link(nic_t * sp, int link)
{
struct net_device *dev = (struct net_device *) sp->dev;
@@ -4493,23 +4497,6 @@
}
/**
- * get_xena_rev_id - to identify revision ID of xena.
- * @pdev : PCI Dev structure
- * Description:
- * Function to identify the Revision ID of xena.
- * Return value:
- * returns the revision ID of the device.
- */
-
-int get_xena_rev_id(struct pci_dev *pdev)
-{
- u8 id = 0;
- int ret;
- ret = pci_read_config_byte(pdev, PCI_REVISION_ID, (u8 *) & id);
- return id;
-}
-
-/**
* s2io_init_pci -Initialization of PCI and PCI-X configuration registers .
* @sp : private member of the device structure, which is a pointer to the
* s2io_nic structure.
@@ -4962,7 +4949,7 @@
* Description: This function is the cleanup routine for the driver. It
unregist * ers the driver.
*/
-void s2io_closer(void)
+static void s2io_closer(void)
{
pci_unregister_driver(&s2io_driver);
DBG_PRINT(INIT_DBG, "cleanup done\n");
diff -Nru a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
--- a/drivers/net/via-rhine.c 2005-03-09 11:18:53 -08:00
+++ b/drivers/net/via-rhine.c 2005-03-09 11:18:53 -08:00
@@ -390,7 +390,7 @@
#ifdef USE_MMIO
/* Registers we check that mmio and reg are the same. */
-int mmio_verify_registers[] = {
+static const int mmio_verify_registers[] = {
RxConfig, TxConfig, IntrEnable, ConfigA, ConfigB, ConfigC, ConfigD,
0
};
diff -Nru a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
--- a/drivers/net/via-velocity.c 2005-03-09 11:18:53 -08:00
+++ b/drivers/net/via-velocity.c 2005-03-09 11:18:53 -08:00
@@ -3096,7 +3096,7 @@
* we are interested in.
*/
-u16 wol_calc_crc(int size, u8 * pattern, u8 *mask_pattern)
+static u16 wol_calc_crc(int size, u8 * pattern, u8 *mask_pattern)
{
u16 crc = 0xFFFF;
u8 mask;
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html