aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/dec
diff options
context:
space:
mode:
authorPradeep A. Dalvi <netdev@pradeepdalvi.com>2012-02-06 06:16:48 -0500
committerDavid S. Miller <davem@davemloft.net>2012-02-08 18:46:38 -0500
commit1ab0d2ec9aeb4489c05158e8a2b00bad89f67e03 (patch)
tree212a334c85c3a6f03f8ada4502344ff3ec31c5f2 /drivers/net/ethernet/dec
parentdae2e9f430c46c29e3f771110094bd3da3625aa4 (diff)
netdev: ethernet dev_alloc_skb to netdev_alloc_skb
Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet - Removed extra skb->dev = dev after netdev_alloc_skb Signed-off-by: Pradeep A Dalvi <netdev@pradeepdalvi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/dec')
-rw-r--r--drivers/net/ethernet/dec/tulip/dmfe.c20
-rw-r--r--drivers/net/ethernet/dec/tulip/uli526x.c21
2 files changed, 23 insertions, 18 deletions
diff --git a/drivers/net/ethernet/dec/tulip/dmfe.c b/drivers/net/ethernet/dec/tulip/dmfe.c
index 51f7542eb45..1eccf494548 100644
--- a/drivers/net/ethernet/dec/tulip/dmfe.c
+++ b/drivers/net/ethernet/dec/tulip/dmfe.c
@@ -325,8 +325,8 @@ static irqreturn_t dmfe_interrupt(int , void *);
325#ifdef CONFIG_NET_POLL_CONTROLLER 325#ifdef CONFIG_NET_POLL_CONTROLLER
326static void poll_dmfe (struct net_device *dev); 326static void poll_dmfe (struct net_device *dev);
327#endif 327#endif
328static void dmfe_descriptor_init(struct dmfe_board_info *, unsigned long); 328static void dmfe_descriptor_init(struct net_device *, unsigned long);
329static void allocate_rx_buffer(struct dmfe_board_info *); 329static void allocate_rx_buffer(struct net_device *);
330static void update_cr6(u32, unsigned long); 330static void update_cr6(u32, unsigned long);
331static void send_filter_frame(struct DEVICE *); 331static void send_filter_frame(struct DEVICE *);
332static void dm9132_id_table(struct DEVICE *); 332static void dm9132_id_table(struct DEVICE *);
@@ -649,7 +649,7 @@ static void dmfe_init_dm910x(struct DEVICE *dev)
649 db->op_mode = db->media_mode; /* Force Mode */ 649 db->op_mode = db->media_mode; /* Force Mode */
650 650
651 /* Initialize Transmit/Receive decriptor and CR3/4 */ 651 /* Initialize Transmit/Receive decriptor and CR3/4 */
652 dmfe_descriptor_init(db, ioaddr); 652 dmfe_descriptor_init(dev, ioaddr);
653 653
654 /* Init CR6 to program DM910x operation */ 654 /* Init CR6 to program DM910x operation */
655 update_cr6(db->cr6_data, ioaddr); 655 update_cr6(db->cr6_data, ioaddr);
@@ -828,7 +828,7 @@ static irqreturn_t dmfe_interrupt(int irq, void *dev_id)
828 828
829 /* reallocate rx descriptor buffer */ 829 /* reallocate rx descriptor buffer */
830 if (db->rx_avail_cnt<RX_DESC_CNT) 830 if (db->rx_avail_cnt<RX_DESC_CNT)
831 allocate_rx_buffer(db); 831 allocate_rx_buffer(dev);
832 832
833 /* Free the transmitted descriptor */ 833 /* Free the transmitted descriptor */
834 if ( db->cr5_data & 0x01) 834 if ( db->cr5_data & 0x01)
@@ -1008,7 +1008,7 @@ static void dmfe_rx_packet(struct DEVICE *dev, struct dmfe_board_info * db)
1008 /* Good packet, send to upper layer */ 1008 /* Good packet, send to upper layer */
1009 /* Shorst packet used new SKB */ 1009 /* Shorst packet used new SKB */
1010 if ((rxlen < RX_COPY_SIZE) && 1010 if ((rxlen < RX_COPY_SIZE) &&
1011 ((newskb = dev_alloc_skb(rxlen + 2)) 1011 ((newskb = netdev_alloc_skb(dev, rxlen + 2))
1012 != NULL)) { 1012 != NULL)) {
1013 1013
1014 skb = newskb; 1014 skb = newskb;
@@ -1364,8 +1364,9 @@ static void dmfe_reuse_skb(struct dmfe_board_info *db, struct sk_buff * skb)
1364 * Using Chain structure, and allocate Tx/Rx buffer 1364 * Using Chain structure, and allocate Tx/Rx buffer
1365 */ 1365 */
1366 1366
1367static void dmfe_descriptor_init(struct dmfe_board_info *db, unsigned long ioaddr) 1367static void dmfe_descriptor_init(struct net_device *dev, unsigned long ioaddr)
1368{ 1368{
1369 struct dmfe_board_info *db = netdev_priv(dev);
1369 struct tx_desc *tmp_tx; 1370 struct tx_desc *tmp_tx;
1370 struct rx_desc *tmp_rx; 1371 struct rx_desc *tmp_rx;
1371 unsigned char *tmp_buf; 1372 unsigned char *tmp_buf;
@@ -1421,7 +1422,7 @@ static void dmfe_descriptor_init(struct dmfe_board_info *db, unsigned long ioadd
1421 tmp_rx->next_rx_desc = db->first_rx_desc; 1422 tmp_rx->next_rx_desc = db->first_rx_desc;
1422 1423
1423 /* pre-allocate Rx buffer */ 1424 /* pre-allocate Rx buffer */
1424 allocate_rx_buffer(db); 1425 allocate_rx_buffer(dev);
1425} 1426}
1426 1427
1427 1428
@@ -1551,15 +1552,16 @@ static void send_filter_frame(struct DEVICE *dev)
1551 * As possible as allocate maxiumn Rx buffer 1552 * As possible as allocate maxiumn Rx buffer
1552 */ 1553 */
1553 1554
1554static void allocate_rx_buffer(struct dmfe_board_info *db) 1555static void allocate_rx_buffer(struct net_device *dev)
1555{ 1556{
1557 struct dmfe_board_info *db = netdev_priv(dev);
1556 struct rx_desc *rxptr; 1558 struct rx_desc *rxptr;
1557 struct sk_buff *skb; 1559 struct sk_buff *skb;
1558 1560
1559 rxptr = db->rx_insert_ptr; 1561 rxptr = db->rx_insert_ptr;
1560 1562
1561 while(db->rx_avail_cnt < RX_DESC_CNT) { 1563 while(db->rx_avail_cnt < RX_DESC_CNT) {
1562 if ( ( skb = dev_alloc_skb(RX_ALLOC_SIZE) ) == NULL ) 1564 if ( ( skb = netdev_alloc_skb(dev, RX_ALLOC_SIZE) ) == NULL )
1563 break; 1565 break;
1564 rxptr->rx_skb_ptr = skb; /* FIXME (?) */ 1566 rxptr->rx_skb_ptr = skb; /* FIXME (?) */
1565 rxptr->rdes2 = cpu_to_le32( pci_map_single(db->pdev, skb->data, 1567 rxptr->rdes2 = cpu_to_le32( pci_map_single(db->pdev, skb->data,
diff --git a/drivers/net/ethernet/dec/tulip/uli526x.c b/drivers/net/ethernet/dec/tulip/uli526x.c
index 48b0b6566ee..fc4001f6a5e 100644
--- a/drivers/net/ethernet/dec/tulip/uli526x.c
+++ b/drivers/net/ethernet/dec/tulip/uli526x.c
@@ -232,8 +232,8 @@ static irqreturn_t uli526x_interrupt(int, void *);
232#ifdef CONFIG_NET_POLL_CONTROLLER 232#ifdef CONFIG_NET_POLL_CONTROLLER
233static void uli526x_poll(struct net_device *dev); 233static void uli526x_poll(struct net_device *dev);
234#endif 234#endif
235static void uli526x_descriptor_init(struct uli526x_board_info *, unsigned long); 235static void uli526x_descriptor_init(struct net_device *, unsigned long);
236static void allocate_rx_buffer(struct uli526x_board_info *); 236static void allocate_rx_buffer(struct net_device *);
237static void update_cr6(u32, unsigned long); 237static void update_cr6(u32, unsigned long);
238static void send_filter_frame(struct net_device *, int); 238static void send_filter_frame(struct net_device *, int);
239static u16 phy_read(unsigned long, u8, u8, u32); 239static u16 phy_read(unsigned long, u8, u8, u32);
@@ -549,7 +549,7 @@ static void uli526x_init(struct net_device *dev)
549 db->op_mode = db->media_mode; /* Force Mode */ 549 db->op_mode = db->media_mode; /* Force Mode */
550 550
551 /* Initialize Transmit/Receive decriptor and CR3/4 */ 551 /* Initialize Transmit/Receive decriptor and CR3/4 */
552 uli526x_descriptor_init(db, ioaddr); 552 uli526x_descriptor_init(dev, ioaddr);
553 553
554 /* Init CR6 to program M526X operation */ 554 /* Init CR6 to program M526X operation */
555 update_cr6(db->cr6_data, ioaddr); 555 update_cr6(db->cr6_data, ioaddr);
@@ -711,7 +711,7 @@ static irqreturn_t uli526x_interrupt(int irq, void *dev_id)
711 711
712 /* reallocate rx descriptor buffer */ 712 /* reallocate rx descriptor buffer */
713 if (db->rx_avail_cnt<RX_DESC_CNT) 713 if (db->rx_avail_cnt<RX_DESC_CNT)
714 allocate_rx_buffer(db); 714 allocate_rx_buffer(dev);
715 715
716 /* Free the transmitted descriptor */ 716 /* Free the transmitted descriptor */
717 if ( db->cr5_data & 0x01) 717 if ( db->cr5_data & 0x01)
@@ -844,7 +844,7 @@ static void uli526x_rx_packet(struct net_device *dev, struct uli526x_board_info
844 /* Good packet, send to upper layer */ 844 /* Good packet, send to upper layer */
845 /* Shorst packet used new SKB */ 845 /* Shorst packet used new SKB */
846 if ((rxlen < RX_COPY_SIZE) && 846 if ((rxlen < RX_COPY_SIZE) &&
847 (((new_skb = dev_alloc_skb(rxlen + 2)) != NULL))) { 847 (((new_skb = netdev_alloc_skb(dev, rxlen + 2)) != NULL))) {
848 skb = new_skb; 848 skb = new_skb;
849 /* size less than COPY_SIZE, allocate a rxlen SKB */ 849 /* size less than COPY_SIZE, allocate a rxlen SKB */
850 skb_reserve(skb, 2); /* 16byte align */ 850 skb_reserve(skb, 2); /* 16byte align */
@@ -1289,8 +1289,9 @@ static void uli526x_reuse_skb(struct uli526x_board_info *db, struct sk_buff * sk
1289 * Using Chain structure, and allocate Tx/Rx buffer 1289 * Using Chain structure, and allocate Tx/Rx buffer
1290 */ 1290 */
1291 1291
1292static void uli526x_descriptor_init(struct uli526x_board_info *db, unsigned long ioaddr) 1292static void uli526x_descriptor_init(struct net_device *dev, unsigned long ioaddr)
1293{ 1293{
1294 struct uli526x_board_info *db = netdev_priv(dev);
1294 struct tx_desc *tmp_tx; 1295 struct tx_desc *tmp_tx;
1295 struct rx_desc *tmp_rx; 1296 struct rx_desc *tmp_rx;
1296 unsigned char *tmp_buf; 1297 unsigned char *tmp_buf;
@@ -1343,7 +1344,7 @@ static void uli526x_descriptor_init(struct uli526x_board_info *db, unsigned long
1343 tmp_rx->next_rx_desc = db->first_rx_desc; 1344 tmp_rx->next_rx_desc = db->first_rx_desc;
1344 1345
1345 /* pre-allocate Rx buffer */ 1346 /* pre-allocate Rx buffer */
1346 allocate_rx_buffer(db); 1347 allocate_rx_buffer(dev);
1347} 1348}
1348 1349
1349 1350
@@ -1433,15 +1434,17 @@ static void send_filter_frame(struct net_device *dev, int mc_cnt)
1433 * As possible as allocate maxiumn Rx buffer 1434 * As possible as allocate maxiumn Rx buffer
1434 */ 1435 */
1435 1436
1436static void allocate_rx_buffer(struct uli526x_board_info *db) 1437static void allocate_rx_buffer(struct net_device *dev)
1437{ 1438{
1439 struct uli526x_board_info *db = netdev_priv(dev);
1438 struct rx_desc *rxptr; 1440 struct rx_desc *rxptr;
1439 struct sk_buff *skb; 1441 struct sk_buff *skb;
1440 1442
1441 rxptr = db->rx_insert_ptr; 1443 rxptr = db->rx_insert_ptr;
1442 1444
1443 while(db->rx_avail_cnt < RX_DESC_CNT) { 1445 while(db->rx_avail_cnt < RX_DESC_CNT) {
1444 if ( ( skb = dev_alloc_skb(RX_ALLOC_SIZE) ) == NULL ) 1446 skb = netdev_alloc_skb(dev, RX_ALLOC_SIZE);
1447 if (skb == NULL)
1445 break; 1448 break;
1446 rxptr->rx_skb_ptr = skb; /* FIXME (?) */ 1449 rxptr->rx_skb_ptr = skb; /* FIXME (?) */
1447 rxptr->rdes2 = cpu_to_le32(pci_map_single(db->pdev, 1450 rxptr->rdes2 = cpu_to_le32(pci_map_single(db->pdev,