@@ -152,7 +152,7 @@ static netdev_tx_t bgmac_dma_tx_add(struct bgmac *bgmac,
152
152
struct bgmac_dma_ring * ring ,
153
153
struct sk_buff * skb )
154
154
{
155
- struct device * dma_dev = bgmac -> core -> dma_dev ;
155
+ struct device * dma_dev = bgmac -> dma_dev ;
156
156
struct net_device * net_dev = bgmac -> net_dev ;
157
157
int index = ring -> end % BGMAC_TX_RING_SLOTS ;
158
158
struct bgmac_slot_info * slot = & ring -> slots [index ];
@@ -254,7 +254,7 @@ static netdev_tx_t bgmac_dma_tx_add(struct bgmac *bgmac,
254
254
/* Free transmitted packets */
255
255
static void bgmac_dma_tx_free (struct bgmac * bgmac , struct bgmac_dma_ring * ring )
256
256
{
257
- struct device * dma_dev = bgmac -> core -> dma_dev ;
257
+ struct device * dma_dev = bgmac -> dma_dev ;
258
258
int empty_slot ;
259
259
bool freed = false;
260
260
unsigned bytes_compl = 0 , pkts_compl = 0 ;
@@ -352,7 +352,7 @@ static void bgmac_dma_rx_enable(struct bgmac *bgmac,
352
352
static int bgmac_dma_rx_skb_for_slot (struct bgmac * bgmac ,
353
353
struct bgmac_slot_info * slot )
354
354
{
355
- struct device * dma_dev = bgmac -> core -> dma_dev ;
355
+ struct device * dma_dev = bgmac -> dma_dev ;
356
356
dma_addr_t dma_addr ;
357
357
struct bgmac_rx_header * rx ;
358
358
void * buf ;
@@ -441,7 +441,7 @@ static int bgmac_dma_rx_read(struct bgmac *bgmac, struct bgmac_dma_ring *ring,
441
441
end_slot /= sizeof (struct bgmac_dma_desc );
442
442
443
443
while (ring -> start != end_slot ) {
444
- struct device * dma_dev = bgmac -> core -> dma_dev ;
444
+ struct device * dma_dev = bgmac -> dma_dev ;
445
445
struct bgmac_slot_info * slot = & ring -> slots [ring -> start ];
446
446
struct bgmac_rx_header * rx = slot -> buf + BGMAC_RX_BUF_OFFSET ;
447
447
struct sk_buff * skb ;
@@ -544,7 +544,7 @@ static bool bgmac_dma_unaligned(struct bgmac *bgmac,
544
544
static void bgmac_dma_tx_ring_free (struct bgmac * bgmac ,
545
545
struct bgmac_dma_ring * ring )
546
546
{
547
- struct device * dma_dev = bgmac -> core -> dma_dev ;
547
+ struct device * dma_dev = bgmac -> dma_dev ;
548
548
struct bgmac_dma_desc * dma_desc = ring -> cpu_base ;
549
549
struct bgmac_slot_info * slot ;
550
550
int i ;
@@ -570,7 +570,7 @@ static void bgmac_dma_tx_ring_free(struct bgmac *bgmac,
570
570
static void bgmac_dma_rx_ring_free (struct bgmac * bgmac ,
571
571
struct bgmac_dma_ring * ring )
572
572
{
573
- struct device * dma_dev = bgmac -> core -> dma_dev ;
573
+ struct device * dma_dev = bgmac -> dma_dev ;
574
574
struct bgmac_slot_info * slot ;
575
575
int i ;
576
576
@@ -591,7 +591,7 @@ static void bgmac_dma_ring_desc_free(struct bgmac *bgmac,
591
591
struct bgmac_dma_ring * ring ,
592
592
int num_slots )
593
593
{
594
- struct device * dma_dev = bgmac -> core -> dma_dev ;
594
+ struct device * dma_dev = bgmac -> dma_dev ;
595
595
int size ;
596
596
597
597
if (!ring -> cpu_base )
@@ -629,7 +629,7 @@ static void bgmac_dma_free(struct bgmac *bgmac)
629
629
630
630
static int bgmac_dma_alloc (struct bgmac * bgmac )
631
631
{
632
- struct device * dma_dev = bgmac -> core -> dma_dev ;
632
+ struct device * dma_dev = bgmac -> dma_dev ;
633
633
struct bgmac_dma_ring * ring ;
634
634
static const u16 ring_base [] = { BGMAC_DMA_BASE0 , BGMAC_DMA_BASE1 ,
635
635
BGMAC_DMA_BASE2 , BGMAC_DMA_BASE3 , };
@@ -1703,6 +1703,7 @@ static int bgmac_probe(struct bcma_device *core)
1703
1703
net_dev -> ethtool_ops = & bgmac_ethtool_ops ;
1704
1704
bgmac = netdev_priv (net_dev );
1705
1705
bgmac -> dev = & core -> dev ;
1706
+ bgmac -> dma_dev = core -> dma_dev ;
1706
1707
bgmac -> net_dev = net_dev ;
1707
1708
bgmac -> core = core ;
1708
1709
bcma_set_drvdata (core , bgmac );
0 commit comments