aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ibmveth.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-05-24 01:31:14 -0400
committerJeff Garzik <jeff@garzik.org>2006-05-24 01:31:14 -0400
commitd7fbeba60b4021dfaf5d315884fbf7672b4ae87b (patch)
tree1da0475fa710af806a2a83d6ee9f6d16c144a028 /drivers/net/ibmveth.c
parent860f242eb5340d0b0cfe243cb86b2a98f92e8b91 (diff)
[netdrvr ibmlana, ibmveth] trim trailing whitespace
Diffstat (limited to 'drivers/net/ibmveth.c')
-rw-r--r--drivers/net/ibmveth.c90
1 files changed, 45 insertions, 45 deletions
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
index 71c74fb048dd..666346f6469e 100644
--- a/drivers/net/ibmveth.c
+++ b/drivers/net/ibmveth.c
@@ -24,7 +24,7 @@
24/* for use with IBM i/pSeries LPAR Linux. It utilizes the logical LAN */ 24/* for use with IBM i/pSeries LPAR Linux. It utilizes the logical LAN */
25/* option of the RS/6000 Platform Architechture to interface with virtual */ 25/* option of the RS/6000 Platform Architechture to interface with virtual */
26/* ethernet NICs that are presented to the partition by the hypervisor. */ 26/* ethernet NICs that are presented to the partition by the hypervisor. */
27/* */ 27/* */
28/**************************************************************************/ 28/**************************************************************************/
29/* 29/*
30 TODO: 30 TODO:
@@ -79,7 +79,7 @@
79#else 79#else
80#define ibmveth_debug_printk_no_adapter(fmt, args...) 80#define ibmveth_debug_printk_no_adapter(fmt, args...)
81#define ibmveth_debug_printk(fmt, args...) 81#define ibmveth_debug_printk(fmt, args...)
82#define ibmveth_assert(expr) 82#define ibmveth_assert(expr)
83#endif 83#endif
84 84
85static int ibmveth_open(struct net_device *dev); 85static int ibmveth_open(struct net_device *dev);
@@ -148,13 +148,13 @@ static int ibmveth_alloc_buffer_pool(struct ibmveth_buff_pool *pool)
148{ 148{
149 int i; 149 int i;
150 150
151 pool->free_map = kmalloc(sizeof(u16) * pool->size, GFP_KERNEL); 151 pool->free_map = kmalloc(sizeof(u16) * pool->size, GFP_KERNEL);
152 152
153 if(!pool->free_map) { 153 if(!pool->free_map) {
154 return -1; 154 return -1;
155 } 155 }
156 156
157 pool->dma_addr = kmalloc(sizeof(dma_addr_t) * pool->size, GFP_KERNEL); 157 pool->dma_addr = kmalloc(sizeof(dma_addr_t) * pool->size, GFP_KERNEL);
158 if(!pool->dma_addr) { 158 if(!pool->dma_addr) {
159 kfree(pool->free_map); 159 kfree(pool->free_map);
160 pool->free_map = NULL; 160 pool->free_map = NULL;
@@ -215,7 +215,7 @@ static void ibmveth_replenish_buffer_pool(struct ibmveth_adapter *adapter, struc
215 215
216 free_index = pool->consumer_index++ % pool->size; 216 free_index = pool->consumer_index++ % pool->size;
217 index = pool->free_map[free_index]; 217 index = pool->free_map[free_index];
218 218
219 ibmveth_assert(index != IBM_VETH_INVALID_MAP); 219 ibmveth_assert(index != IBM_VETH_INVALID_MAP);
220 ibmveth_assert(pool->skbuff[index] == NULL); 220 ibmveth_assert(pool->skbuff[index] == NULL);
221 221
@@ -232,10 +232,10 @@ static void ibmveth_replenish_buffer_pool(struct ibmveth_adapter *adapter, struc
232 desc.desc = 0; 232 desc.desc = 0;
233 desc.fields.valid = 1; 233 desc.fields.valid = 1;
234 desc.fields.length = pool->buff_size; 234 desc.fields.length = pool->buff_size;
235 desc.fields.address = dma_addr; 235 desc.fields.address = dma_addr;
236 236
237 lpar_rc = h_add_logical_lan_buffer(adapter->vdev->unit_address, desc.desc); 237 lpar_rc = h_add_logical_lan_buffer(adapter->vdev->unit_address, desc.desc);
238 238
239 if(lpar_rc != H_SUCCESS) { 239 if(lpar_rc != H_SUCCESS) {
240 pool->free_map[free_index] = index; 240 pool->free_map[free_index] = index;
241 pool->skbuff[index] = NULL; 241 pool->skbuff[index] = NULL;
@@ -251,13 +251,13 @@ static void ibmveth_replenish_buffer_pool(struct ibmveth_adapter *adapter, struc
251 adapter->replenish_add_buff_success++; 251 adapter->replenish_add_buff_success++;
252 } 252 }
253 } 253 }
254 254
255 mb(); 255 mb();
256 atomic_add(buffers_added, &(pool->available)); 256 atomic_add(buffers_added, &(pool->available));
257} 257}
258 258
259/* replenish routine */ 259/* replenish routine */
260static void ibmveth_replenish_task(struct ibmveth_adapter *adapter) 260static void ibmveth_replenish_task(struct ibmveth_adapter *adapter)
261{ 261{
262 int i; 262 int i;
263 263
@@ -265,7 +265,7 @@ static void ibmveth_replenish_task(struct ibmveth_adapter *adapter)
265 265
266 for(i = 0; i < IbmVethNumBufferPools; i++) 266 for(i = 0; i < IbmVethNumBufferPools; i++)
267 if(adapter->rx_buff_pool[i].active) 267 if(adapter->rx_buff_pool[i].active)
268 ibmveth_replenish_buffer_pool(adapter, 268 ibmveth_replenish_buffer_pool(adapter,
269 &adapter->rx_buff_pool[i]); 269 &adapter->rx_buff_pool[i]);
270 270
271 adapter->rx_no_buffer = *(u64*)(((char*)adapter->buffer_list_addr) + 4096 - 8); 271 adapter->rx_no_buffer = *(u64*)(((char*)adapter->buffer_list_addr) + 4096 - 8);
@@ -372,7 +372,7 @@ static void ibmveth_rxq_recycle_buffer(struct ibmveth_adapter *adapter)
372 desc.fields.address = adapter->rx_buff_pool[pool].dma_addr[index]; 372 desc.fields.address = adapter->rx_buff_pool[pool].dma_addr[index];
373 373
374 lpar_rc = h_add_logical_lan_buffer(adapter->vdev->unit_address, desc.desc); 374 lpar_rc = h_add_logical_lan_buffer(adapter->vdev->unit_address, desc.desc);
375 375
376 if(lpar_rc != H_SUCCESS) { 376 if(lpar_rc != H_SUCCESS) {
377 ibmveth_debug_printk("h_add_logical_lan_buffer failed during recycle rc=%ld", lpar_rc); 377 ibmveth_debug_printk("h_add_logical_lan_buffer failed during recycle rc=%ld", lpar_rc);
378 ibmveth_remove_buffer_from_pool(adapter, adapter->rx_queue.queue_addr[adapter->rx_queue.index].correlator); 378 ibmveth_remove_buffer_from_pool(adapter, adapter->rx_queue.queue_addr[adapter->rx_queue.index].correlator);
@@ -407,7 +407,7 @@ static void ibmveth_cleanup(struct ibmveth_adapter *adapter)
407 } 407 }
408 free_page((unsigned long)adapter->buffer_list_addr); 408 free_page((unsigned long)adapter->buffer_list_addr);
409 adapter->buffer_list_addr = NULL; 409 adapter->buffer_list_addr = NULL;
410 } 410 }
411 411
412 if(adapter->filter_list_addr != NULL) { 412 if(adapter->filter_list_addr != NULL) {
413 if(!dma_mapping_error(adapter->filter_list_dma)) { 413 if(!dma_mapping_error(adapter->filter_list_dma)) {
@@ -434,7 +434,7 @@ static void ibmveth_cleanup(struct ibmveth_adapter *adapter)
434 434
435 for(i = 0; i<IbmVethNumBufferPools; i++) 435 for(i = 0; i<IbmVethNumBufferPools; i++)
436 if (adapter->rx_buff_pool[i].active) 436 if (adapter->rx_buff_pool[i].active)
437 ibmveth_free_buffer_pool(adapter, 437 ibmveth_free_buffer_pool(adapter,
438 &adapter->rx_buff_pool[i]); 438 &adapter->rx_buff_pool[i]);
439} 439}
440 440
@@ -452,10 +452,10 @@ static int ibmveth_open(struct net_device *netdev)
452 452
453 for(i = 0; i<IbmVethNumBufferPools; i++) 453 for(i = 0; i<IbmVethNumBufferPools; i++)
454 rxq_entries += adapter->rx_buff_pool[i].size; 454 rxq_entries += adapter->rx_buff_pool[i].size;
455 455
456 adapter->buffer_list_addr = (void*) get_zeroed_page(GFP_KERNEL); 456 adapter->buffer_list_addr = (void*) get_zeroed_page(GFP_KERNEL);
457 adapter->filter_list_addr = (void*) get_zeroed_page(GFP_KERNEL); 457 adapter->filter_list_addr = (void*) get_zeroed_page(GFP_KERNEL);
458 458
459 if(!adapter->buffer_list_addr || !adapter->filter_list_addr) { 459 if(!adapter->buffer_list_addr || !adapter->filter_list_addr) {
460 ibmveth_error_printk("unable to allocate filter or buffer list pages\n"); 460 ibmveth_error_printk("unable to allocate filter or buffer list pages\n");
461 ibmveth_cleanup(adapter); 461 ibmveth_cleanup(adapter);
@@ -503,7 +503,7 @@ static int ibmveth_open(struct net_device *netdev)
503 ibmveth_debug_printk("filter list @ 0x%p\n", adapter->filter_list_addr); 503 ibmveth_debug_printk("filter list @ 0x%p\n", adapter->filter_list_addr);
504 ibmveth_debug_printk("receive q @ 0x%p\n", adapter->rx_queue.queue_addr); 504 ibmveth_debug_printk("receive q @ 0x%p\n", adapter->rx_queue.queue_addr);
505 505
506 506
507 lpar_rc = h_register_logical_lan(adapter->vdev->unit_address, 507 lpar_rc = h_register_logical_lan(adapter->vdev->unit_address,
508 adapter->buffer_list_dma, 508 adapter->buffer_list_dma,
509 rxq_desc.desc, 509 rxq_desc.desc,
@@ -518,7 +518,7 @@ static int ibmveth_open(struct net_device *netdev)
518 rxq_desc.desc, 518 rxq_desc.desc,
519 mac_address); 519 mac_address);
520 ibmveth_cleanup(adapter); 520 ibmveth_cleanup(adapter);
521 return -ENONET; 521 return -ENONET;
522 } 522 }
523 523
524 for(i = 0; i<IbmVethNumBufferPools; i++) { 524 for(i = 0; i<IbmVethNumBufferPools; i++) {
@@ -557,7 +557,7 @@ static int ibmveth_close(struct net_device *netdev)
557{ 557{
558 struct ibmveth_adapter *adapter = netdev->priv; 558 struct ibmveth_adapter *adapter = netdev->priv;
559 long lpar_rc; 559 long lpar_rc;
560 560
561 ibmveth_debug_printk("close starting\n"); 561 ibmveth_debug_printk("close starting\n");
562 562
563 if (!adapter->pool_config) 563 if (!adapter->pool_config)
@@ -705,7 +705,7 @@ static int ibmveth_start_xmit(struct sk_buff *skb, struct net_device *netdev)
705 desc[5].desc, 705 desc[5].desc,
706 correlator); 706 correlator);
707 } while ((lpar_rc == H_BUSY) && (retry_count--)); 707 } while ((lpar_rc == H_BUSY) && (retry_count--));
708 708
709 if(lpar_rc != H_SUCCESS && lpar_rc != H_DROPPED) { 709 if(lpar_rc != H_SUCCESS && lpar_rc != H_DROPPED) {
710 int i; 710 int i;
711 ibmveth_error_printk("tx: h_send_logical_lan failed with rc=%ld\n", lpar_rc); 711 ibmveth_error_printk("tx: h_send_logical_lan failed with rc=%ld\n", lpar_rc);
@@ -791,7 +791,7 @@ static int ibmveth_poll(struct net_device *netdev, int *budget)
791 /* more work to do - return that we are not done yet */ 791 /* more work to do - return that we are not done yet */
792 netdev->quota -= frames_processed; 792 netdev->quota -= frames_processed;
793 *budget -= frames_processed; 793 *budget -= frames_processed;
794 return 1; 794 return 1;
795 } 795 }
796 796
797 /* we think we are done - reenable interrupts, then check once more to make sure we are done */ 797 /* we think we are done - reenable interrupts, then check once more to make sure we are done */
@@ -817,7 +817,7 @@ static int ibmveth_poll(struct net_device *netdev, int *budget)
817} 817}
818 818
819static irqreturn_t ibmveth_interrupt(int irq, void *dev_instance, struct pt_regs *regs) 819static irqreturn_t ibmveth_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
820{ 820{
821 struct net_device *netdev = dev_instance; 821 struct net_device *netdev = dev_instance;
822 struct ibmveth_adapter *adapter = netdev->priv; 822 struct ibmveth_adapter *adapter = netdev->priv;
823 unsigned long lpar_rc; 823 unsigned long lpar_rc;
@@ -873,7 +873,7 @@ static void ibmveth_set_multicast_list(struct net_device *netdev)
873 ibmveth_error_printk("h_multicast_ctrl rc=%ld when adding an entry to the filter table\n", lpar_rc); 873 ibmveth_error_printk("h_multicast_ctrl rc=%ld when adding an entry to the filter table\n", lpar_rc);
874 } 874 }
875 } 875 }
876 876
877 /* re-enable filtering */ 877 /* re-enable filtering */
878 lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address, 878 lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address,
879 IbmVethMcastEnableFiltering, 879 IbmVethMcastEnableFiltering,
@@ -915,7 +915,7 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
915 unsigned int *mcastFilterSize_p; 915 unsigned int *mcastFilterSize_p;
916 916
917 917
918 ibmveth_debug_printk_no_adapter("entering ibmveth_probe for UA 0x%x\n", 918 ibmveth_debug_printk_no_adapter("entering ibmveth_probe for UA 0x%x\n",
919 dev->unit_address); 919 dev->unit_address);
920 920
921 mac_addr_p = (unsigned char *) vio_get_attribute(dev, VETH_MAC_ADDR, 0); 921 mac_addr_p = (unsigned char *) vio_get_attribute(dev, VETH_MAC_ADDR, 0);
@@ -924,7 +924,7 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
924 "attribute\n", __FILE__, __LINE__); 924 "attribute\n", __FILE__, __LINE__);
925 return 0; 925 return 0;
926 } 926 }
927 927
928 mcastFilterSize_p= (unsigned int *) vio_get_attribute(dev, VETH_MCAST_FILTER_SIZE, 0); 928 mcastFilterSize_p= (unsigned int *) vio_get_attribute(dev, VETH_MCAST_FILTER_SIZE, 0);
929 if(!mcastFilterSize_p) { 929 if(!mcastFilterSize_p) {
930 printk(KERN_ERR "(%s:%3.3d) ERROR: Can't find " 930 printk(KERN_ERR "(%s:%3.3d) ERROR: Can't find "
@@ -932,7 +932,7 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
932 __FILE__, __LINE__); 932 __FILE__, __LINE__);
933 return 0; 933 return 0;
934 } 934 }
935 935
936 netdev = alloc_etherdev(sizeof(struct ibmveth_adapter)); 936 netdev = alloc_etherdev(sizeof(struct ibmveth_adapter));
937 937
938 if(!netdev) 938 if(!netdev)
@@ -948,13 +948,13 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
948 adapter->netdev = netdev; 948 adapter->netdev = netdev;
949 adapter->mcastFilterSize= *mcastFilterSize_p; 949 adapter->mcastFilterSize= *mcastFilterSize_p;
950 adapter->pool_config = 0; 950 adapter->pool_config = 0;
951 951
952 /* Some older boxes running PHYP non-natively have an OF that 952 /* Some older boxes running PHYP non-natively have an OF that
953 returns a 8-byte local-mac-address field (and the first 953 returns a 8-byte local-mac-address field (and the first
954 2 bytes have to be ignored) while newer boxes' OF return 954 2 bytes have to be ignored) while newer boxes' OF return
955 a 6-byte field. Note that IEEE 1275 specifies that 955 a 6-byte field. Note that IEEE 1275 specifies that
956 local-mac-address must be a 6-byte field. 956 local-mac-address must be a 6-byte field.
957 The RPA doc specifies that the first byte must be 10b, so 957 The RPA doc specifies that the first byte must be 10b, so
958 we'll just look for it to solve this 8 vs. 6 byte field issue */ 958 we'll just look for it to solve this 8 vs. 6 byte field issue */
959 959
960 if ((*mac_addr_p & 0x3) != 0x02) 960 if ((*mac_addr_p & 0x3) != 0x02)
@@ -964,7 +964,7 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
964 memcpy(&adapter->mac_addr, mac_addr_p, 6); 964 memcpy(&adapter->mac_addr, mac_addr_p, 6);
965 965
966 adapter->liobn = dev->iommu_table->it_index; 966 adapter->liobn = dev->iommu_table->it_index;
967 967
968 netdev->irq = dev->irq; 968 netdev->irq = dev->irq;
969 netdev->open = ibmveth_open; 969 netdev->open = ibmveth_open;
970 netdev->poll = ibmveth_poll; 970 netdev->poll = ibmveth_poll;
@@ -977,15 +977,15 @@ static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_
977 netdev->ethtool_ops = &netdev_ethtool_ops; 977 netdev->ethtool_ops = &netdev_ethtool_ops;
978 netdev->change_mtu = ibmveth_change_mtu; 978 netdev->change_mtu = ibmveth_change_mtu;
979 SET_NETDEV_DEV(netdev, &dev->dev); 979 SET_NETDEV_DEV(netdev, &dev->dev);
980 netdev->features |= NETIF_F_LLTX; 980 netdev->features |= NETIF_F_LLTX;
981 spin_lock_init(&adapter->stats_lock); 981 spin_lock_init(&adapter->stats_lock);
982 982
983 memcpy(&netdev->dev_addr, &adapter->mac_addr, netdev->addr_len); 983 memcpy(&netdev->dev_addr, &adapter->mac_addr, netdev->addr_len);
984 984
985 for(i = 0; i<IbmVethNumBufferPools; i++) { 985 for(i = 0; i<IbmVethNumBufferPools; i++) {
986 struct kobject *kobj = &adapter->rx_buff_pool[i].kobj; 986 struct kobject *kobj = &adapter->rx_buff_pool[i].kobj;
987 ibmveth_init_buffer_pool(&adapter->rx_buff_pool[i], i, 987 ibmveth_init_buffer_pool(&adapter->rx_buff_pool[i], i,
988 pool_count[i], pool_size[i], 988 pool_count[i], pool_size[i],
989 pool_active[i]); 989 pool_active[i]);
990 kobj->parent = &dev->dev.kobj; 990 kobj->parent = &dev->dev.kobj;
991 sprintf(kobj->name, "pool%d", i); 991 sprintf(kobj->name, "pool%d", i);
@@ -1047,7 +1047,7 @@ static void ibmveth_proc_unregister_driver(void)
1047 remove_proc_entry(IBMVETH_PROC_DIR, NULL); 1047 remove_proc_entry(IBMVETH_PROC_DIR, NULL);
1048} 1048}
1049 1049
1050static void *ibmveth_seq_start(struct seq_file *seq, loff_t *pos) 1050static void *ibmveth_seq_start(struct seq_file *seq, loff_t *pos)
1051{ 1051{
1052 if (*pos == 0) { 1052 if (*pos == 0) {
1053 return (void *)1; 1053 return (void *)1;
@@ -1062,18 +1062,18 @@ static void *ibmveth_seq_next(struct seq_file *seq, void *v, loff_t *pos)
1062 return NULL; 1062 return NULL;
1063} 1063}
1064 1064
1065static void ibmveth_seq_stop(struct seq_file *seq, void *v) 1065static void ibmveth_seq_stop(struct seq_file *seq, void *v)
1066{ 1066{
1067} 1067}
1068 1068
1069static int ibmveth_seq_show(struct seq_file *seq, void *v) 1069static int ibmveth_seq_show(struct seq_file *seq, void *v)
1070{ 1070{
1071 struct ibmveth_adapter *adapter = seq->private; 1071 struct ibmveth_adapter *adapter = seq->private;
1072 char *current_mac = ((char*) &adapter->netdev->dev_addr); 1072 char *current_mac = ((char*) &adapter->netdev->dev_addr);
1073 char *firmware_mac = ((char*) &adapter->mac_addr) ; 1073 char *firmware_mac = ((char*) &adapter->mac_addr) ;
1074 1074
1075 seq_printf(seq, "%s %s\n\n", ibmveth_driver_string, ibmveth_driver_version); 1075 seq_printf(seq, "%s %s\n\n", ibmveth_driver_string, ibmveth_driver_version);
1076 1076
1077 seq_printf(seq, "Unit Address: 0x%x\n", adapter->vdev->unit_address); 1077 seq_printf(seq, "Unit Address: 0x%x\n", adapter->vdev->unit_address);
1078 seq_printf(seq, "LIOBN: 0x%lx\n", adapter->liobn); 1078 seq_printf(seq, "LIOBN: 0x%lx\n", adapter->liobn);
1079 seq_printf(seq, "Current MAC: %02X:%02X:%02X:%02X:%02X:%02X\n", 1079 seq_printf(seq, "Current MAC: %02X:%02X:%02X:%02X:%02X:%02X\n",
@@ -1082,7 +1082,7 @@ static int ibmveth_seq_show(struct seq_file *seq, void *v)
1082 seq_printf(seq, "Firmware MAC: %02X:%02X:%02X:%02X:%02X:%02X\n", 1082 seq_printf(seq, "Firmware MAC: %02X:%02X:%02X:%02X:%02X:%02X\n",
1083 firmware_mac[0], firmware_mac[1], firmware_mac[2], 1083 firmware_mac[0], firmware_mac[1], firmware_mac[2],
1084 firmware_mac[3], firmware_mac[4], firmware_mac[5]); 1084 firmware_mac[3], firmware_mac[4], firmware_mac[5]);
1085 1085
1086 seq_printf(seq, "\nAdapter Statistics:\n"); 1086 seq_printf(seq, "\nAdapter Statistics:\n");
1087 seq_printf(seq, " TX: skbuffs linearized: %ld\n", adapter->tx_linearized); 1087 seq_printf(seq, " TX: skbuffs linearized: %ld\n", adapter->tx_linearized);
1088 seq_printf(seq, " multi-descriptor sends: %ld\n", adapter->tx_multidesc_send); 1088 seq_printf(seq, " multi-descriptor sends: %ld\n", adapter->tx_multidesc_send);
@@ -1094,7 +1094,7 @@ static int ibmveth_seq_show(struct seq_file *seq, void *v)
1094 seq_printf(seq, " add buffer failures: %ld\n", adapter->replenish_add_buff_failure); 1094 seq_printf(seq, " add buffer failures: %ld\n", adapter->replenish_add_buff_failure);
1095 seq_printf(seq, " invalid buffers: %ld\n", adapter->rx_invalid_buffer); 1095 seq_printf(seq, " invalid buffers: %ld\n", adapter->rx_invalid_buffer);
1096 seq_printf(seq, " no buffers: %ld\n", adapter->rx_no_buffer); 1096 seq_printf(seq, " no buffers: %ld\n", adapter->rx_no_buffer);
1097 1097
1098 return 0; 1098 return 0;
1099} 1099}
1100static struct seq_operations ibmveth_seq_ops = { 1100static struct seq_operations ibmveth_seq_ops = {
@@ -1152,11 +1152,11 @@ static void ibmveth_proc_unregister_adapter(struct ibmveth_adapter *adapter)
1152} 1152}
1153 1153
1154#else /* CONFIG_PROC_FS */ 1154#else /* CONFIG_PROC_FS */
1155static void ibmveth_proc_register_adapter(struct ibmveth_adapter *adapter) 1155static void ibmveth_proc_register_adapter(struct ibmveth_adapter *adapter)
1156{ 1156{
1157} 1157}
1158 1158
1159static void ibmveth_proc_unregister_adapter(struct ibmveth_adapter *adapter) 1159static void ibmveth_proc_unregister_adapter(struct ibmveth_adapter *adapter)
1160{ 1160{
1161} 1161}
1162static void ibmveth_proc_register_driver(void) 1162static void ibmveth_proc_register_driver(void)
@@ -1175,7 +1175,7 @@ static struct attribute veth_size_attr;
1175static ssize_t veth_pool_show(struct kobject * kobj, 1175static ssize_t veth_pool_show(struct kobject * kobj,
1176 struct attribute * attr, char * buf) 1176 struct attribute * attr, char * buf)
1177{ 1177{
1178 struct ibmveth_buff_pool *pool = container_of(kobj, 1178 struct ibmveth_buff_pool *pool = container_of(kobj,
1179 struct ibmveth_buff_pool, 1179 struct ibmveth_buff_pool,
1180 kobj); 1180 kobj);
1181 1181
@@ -1191,10 +1191,10 @@ static ssize_t veth_pool_show(struct kobject * kobj,
1191static ssize_t veth_pool_store(struct kobject * kobj, struct attribute * attr, 1191static ssize_t veth_pool_store(struct kobject * kobj, struct attribute * attr,
1192const char * buf, size_t count) 1192const char * buf, size_t count)
1193{ 1193{
1194 struct ibmveth_buff_pool *pool = container_of(kobj, 1194 struct ibmveth_buff_pool *pool = container_of(kobj,
1195 struct ibmveth_buff_pool, 1195 struct ibmveth_buff_pool,
1196 kobj); 1196 kobj);
1197 struct net_device *netdev = 1197 struct net_device *netdev =
1198 container_of(kobj->parent, struct device, kobj)->driver_data; 1198 container_of(kobj->parent, struct device, kobj)->driver_data;
1199 struct ibmveth_adapter *adapter = netdev->priv; 1199 struct ibmveth_adapter *adapter = netdev->priv;
1200 long value = simple_strtol(buf, NULL, 10); 1200 long value = simple_strtol(buf, NULL, 10);
@@ -1323,7 +1323,7 @@ static void __exit ibmveth_module_exit(void)
1323{ 1323{
1324 vio_unregister_driver(&ibmveth_driver); 1324 vio_unregister_driver(&ibmveth_driver);
1325 ibmveth_proc_unregister_driver(); 1325 ibmveth_proc_unregister_driver();
1326} 1326}
1327 1327
1328module_init(ibmveth_module_init); 1328module_init(ibmveth_module_init);
1329module_exit(ibmveth_module_exit); 1329module_exit(ibmveth_module_exit);