@@ -1656,7 +1656,6 @@ static void ionic_txrx_deinit(struct ionic_lif *lif)
16561656 if (lif -> rxqcqs ) {
16571657 for (i = 0 ; i < lif -> nxqs && lif -> rxqcqs [i ]; i ++ ) {
16581658 ionic_lif_qcq_deinit (lif , lif -> rxqcqs [i ]);
1659- ionic_rx_flush (& lif -> rxqcqs [i ]-> cq );
16601659 ionic_rx_empty (& lif -> rxqcqs [i ]-> q );
16611660 }
16621661 }
@@ -1915,11 +1914,11 @@ static int ionic_get_vf_config(struct net_device *netdev,
19151914 ret = - EINVAL ;
19161915 } else {
19171916 ivf -> vf = vf ;
1918- ivf -> vlan = ionic -> vfs [vf ].vlanid ;
1917+ ivf -> vlan = le16_to_cpu ( ionic -> vfs [vf ].vlanid ) ;
19191918 ivf -> qos = 0 ;
19201919 ivf -> spoofchk = ionic -> vfs [vf ].spoofchk ;
19211920 ivf -> linkstate = ionic -> vfs [vf ].linkstate ;
1922- ivf -> max_tx_rate = ionic -> vfs [vf ].maxrate ;
1921+ ivf -> max_tx_rate = le32_to_cpu ( ionic -> vfs [vf ].maxrate ) ;
19231922 ivf -> trusted = ionic -> vfs [vf ].trusted ;
19241923 ether_addr_copy (ivf -> mac , ionic -> vfs [vf ].macaddr );
19251924 }
@@ -2019,7 +2018,7 @@ static int ionic_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan,
20192018 ret = ionic_set_vf_config (ionic , vf ,
20202019 IONIC_VF_ATTR_VLAN , (u8 * )& vlan );
20212020 if (!ret )
2022- ionic -> vfs [vf ].vlanid = vlan ;
2021+ ionic -> vfs [vf ].vlanid = cpu_to_le16 ( vlan ) ;
20232022 }
20242023
20252024 up_write (& ionic -> vf_op_lock );
@@ -2048,7 +2047,7 @@ static int ionic_set_vf_rate(struct net_device *netdev, int vf,
20482047 ret = ionic_set_vf_config (ionic , vf ,
20492048 IONIC_VF_ATTR_RATE , (u8 * )& tx_max );
20502049 if (!ret )
2051- lif -> ionic -> vfs [vf ].maxrate = tx_max ;
2050+ lif -> ionic -> vfs [vf ].maxrate = cpu_to_le32 ( tx_max ) ;
20522051 }
20532052
20542053 up_write (& ionic -> vf_op_lock );
@@ -2981,14 +2980,14 @@ void ionic_lif_unregister(struct ionic_lif *lif)
29812980
29822981static void ionic_lif_queue_identify (struct ionic_lif * lif )
29832982{
2983+ union ionic_q_identity __iomem * q_ident ;
29842984 struct ionic * ionic = lif -> ionic ;
2985- union ionic_q_identity * q_ident ;
29862985 struct ionic_dev * idev ;
29872986 int qtype ;
29882987 int err ;
29892988
29902989 idev = & lif -> ionic -> idev ;
2991- q_ident = (union ionic_q_identity * )& idev -> dev_cmd_regs -> data ;
2990+ q_ident = (union ionic_q_identity __iomem * )& idev -> dev_cmd_regs -> data ;
29922991
29932992 for (qtype = 0 ; qtype < ARRAY_SIZE (ionic_qtype_versions ); qtype ++ ) {
29942993 struct ionic_qtype_info * qti = & lif -> qtype_info [qtype ];
@@ -3011,14 +3010,14 @@ static void ionic_lif_queue_identify(struct ionic_lif *lif)
30113010 ionic_qtype_versions [qtype ]);
30123011 err = ionic_dev_cmd_wait (ionic , DEVCMD_TIMEOUT );
30133012 if (!err ) {
3014- qti -> version = q_ident -> version ;
3015- qti -> supported = q_ident -> supported ;
3016- qti -> features = le64_to_cpu ( q_ident -> features );
3017- qti -> desc_sz = le16_to_cpu ( q_ident -> desc_sz );
3018- qti -> comp_sz = le16_to_cpu ( q_ident -> comp_sz );
3019- qti -> sg_desc_sz = le16_to_cpu ( q_ident -> sg_desc_sz );
3020- qti -> max_sg_elems = le16_to_cpu ( q_ident -> max_sg_elems );
3021- qti -> sg_desc_stride = le16_to_cpu ( q_ident -> sg_desc_stride );
3013+ qti -> version = readb ( & q_ident -> version ) ;
3014+ qti -> supported = readb ( & q_ident -> supported ) ;
3015+ qti -> features = readq ( & q_ident -> features );
3016+ qti -> desc_sz = readw ( & q_ident -> desc_sz );
3017+ qti -> comp_sz = readw ( & q_ident -> comp_sz );
3018+ qti -> sg_desc_sz = readw ( & q_ident -> sg_desc_sz );
3019+ qti -> max_sg_elems = readw ( & q_ident -> max_sg_elems );
3020+ qti -> sg_desc_stride = readw ( & q_ident -> sg_desc_stride );
30223021 }
30233022 mutex_unlock (& ionic -> dev_cmd_lock );
30243023
0 commit comments