[linux-next:master 2744/3213] drivers/net/ethernet/broadcom/cnic.c:4940:33: sparse: sparse: incorrect type in assignment (different base types)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   b01d57bfdc41c8f635b08b8a5af8a31217d46936
commit: 960984d964a9341cf50bf2b4ffdf0beb14467517 [2744/3213] include/linux/compiler-gcc.h: sparse can do constant folding of __builtin_bswap*()
config: x86_64-randconfig-s021-20210309 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-262-g5e674421-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=960984d964a9341cf50bf2b4ffdf0beb14467517
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout 960984d964a9341cf50bf2b4ffdf0beb14467517
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


"sparse warnings: (new ones prefixed by >>)"
   drivers/net/ethernet/broadcom/cnic.c:1838:48: sparse:     got unsigned long long
   drivers/net/ethernet/broadcom/cnic.c:1840:48: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] hi @@     got unsigned long long @@
   drivers/net/ethernet/broadcom/cnic.c:1840:48: sparse:     expected restricted __le32 [usertype] hi
   drivers/net/ethernet/broadcom/cnic.c:1840:48: sparse:     got unsigned long long
   drivers/net/ethernet/broadcom/cnic.c:1842:48: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] lo @@     got unsigned int [usertype] @@
   drivers/net/ethernet/broadcom/cnic.c:1842:48: sparse:     expected restricted __le32 [usertype] lo
   drivers/net/ethernet/broadcom/cnic.c:1842:48: sparse:     got unsigned int [usertype]
   drivers/net/ethernet/broadcom/cnic.c:1843:48: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] hi @@     got unsigned int [usertype] @@
   drivers/net/ethernet/broadcom/cnic.c:1843:48: sparse:     expected restricted __le32 [usertype] hi
   drivers/net/ethernet/broadcom/cnic.c:1843:48: sparse:     got unsigned int [usertype]
   drivers/net/ethernet/broadcom/cnic.c:1844:50: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] lo @@     got unsigned long long @@
   drivers/net/ethernet/broadcom/cnic.c:1844:50: sparse:     expected restricted __le32 [usertype] lo
   drivers/net/ethernet/broadcom/cnic.c:1844:50: sparse:     got unsigned long long
   drivers/net/ethernet/broadcom/cnic.c:1846:50: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] hi @@     got unsigned long long @@
   drivers/net/ethernet/broadcom/cnic.c:1846:50: sparse:     expected restricted __le32 [usertype] hi
   drivers/net/ethernet/broadcom/cnic.c:1846:50: sparse:     got unsigned long long
   drivers/net/ethernet/broadcom/cnic.c:1850:47: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] lo @@     got unsigned int @@
   drivers/net/ethernet/broadcom/cnic.c:1850:47: sparse:     expected restricted __le32 [usertype] lo
   drivers/net/ethernet/broadcom/cnic.c:1850:47: sparse:     got unsigned int
   drivers/net/ethernet/broadcom/cnic.c:1852:47: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] hi @@     got unsigned int [usertype] cq_page_table_addr_hi @@
   drivers/net/ethernet/broadcom/cnic.c:1852:47: sparse:     expected restricted __le32 [usertype] hi
   drivers/net/ethernet/broadcom/cnic.c:1852:47: sparse:     got unsigned int [usertype] cq_page_table_addr_hi
   drivers/net/ethernet/broadcom/cnic.c:2071:17: sparse: sparse: cast from restricted __sum16
   drivers/net/ethernet/broadcom/cnic.c:2320:35: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] lo @@     got unsigned long long @@
   drivers/net/ethernet/broadcom/cnic.c:2320:35: sparse:     expected restricted __le32 [usertype] lo
   drivers/net/ethernet/broadcom/cnic.c:2320:35: sparse:     got unsigned long long
   drivers/net/ethernet/broadcom/cnic.c:2321:35: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] hi @@     got unsigned long long @@
   drivers/net/ethernet/broadcom/cnic.c:2321:35: sparse:     expected restricted __le32 [usertype] hi
   drivers/net/ethernet/broadcom/cnic.c:2321:35: sparse:     got unsigned long long
   drivers/net/ethernet/broadcom/cnic.c:2322:32: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] eq_pbl_size @@     got int num_pages @@
   drivers/net/ethernet/broadcom/cnic.c:2322:32: sparse:     expected restricted __le32 [usertype] eq_pbl_size
   drivers/net/ethernet/broadcom/cnic.c:2322:32: sparse:     got int num_pages
   drivers/net/ethernet/broadcom/cnic.c:2324:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 [usertype] sb_num @@     got unsigned int [usertype] status_blk_num @@
   drivers/net/ethernet/broadcom/cnic.c:2324:27: sparse:     expected restricted __le16 [usertype] sb_num
   drivers/net/ethernet/broadcom/cnic.c:2324:27: sparse:     got unsigned int [usertype] status_blk_num
   drivers/net/ethernet/broadcom/cnic.c:2325:28: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 [usertype] eq_prod @@     got unsigned long @@
   drivers/net/ethernet/broadcom/cnic.c:2325:28: sparse:     expected restricted __le16 [usertype] eq_prod
   drivers/net/ethernet/broadcom/cnic.c:2325:28: sparse:     got unsigned long
   drivers/net/ethernet/broadcom/cnic.c:2366:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] l5_cid @@     got restricted __le16 [usertype] fcoe_conn_id @@
   drivers/net/ethernet/broadcom/cnic.c:2366:16: sparse:     expected unsigned int [usertype] l5_cid
   drivers/net/ethernet/broadcom/cnic.c:2366:16: sparse:     got restricted __le16 [usertype] fcoe_conn_id
   drivers/net/ethernet/broadcom/cnic.c:2423:27: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [addressable] [assigned] [usertype] fcoe_conn_id @@     got restricted __le16 [usertype] fcoe_conn_id @@
   drivers/net/ethernet/broadcom/cnic.c:2423:27: sparse:     expected restricted __le32 [addressable] [assigned] [usertype] fcoe_conn_id
   drivers/net/ethernet/broadcom/cnic.c:2423:27: sparse:     got restricted __le16 [usertype] fcoe_conn_id
   drivers/net/ethernet/broadcom/cnic.c:2424:32: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [addressable] [assigned] [usertype] completion_status @@     got int @@
   drivers/net/ethernet/broadcom/cnic.c:2424:32: sparse:     expected restricted __le32 [addressable] [assigned] [usertype] completion_status
   drivers/net/ethernet/broadcom/cnic.c:2424:32: sparse:     got int
   drivers/net/ethernet/broadcom/cnic.c:2441:13: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] cid @@     got restricted __le32 [usertype] context_id @@
   drivers/net/ethernet/broadcom/cnic.c:2441:13: sparse:     expected unsigned int [usertype] cid
   drivers/net/ethernet/broadcom/cnic.c:2441:13: sparse:     got restricted __le32 [usertype] context_id
   drivers/net/ethernet/broadcom/cnic.c:2442:21: sparse: sparse: restricted __le32 degrades to integer
   drivers/net/ethernet/broadcom/cnic.c:2469:13: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] cid @@     got restricted __le32 [usertype] context_id @@
   drivers/net/ethernet/broadcom/cnic.c:2469:13: sparse:     expected unsigned int [usertype] cid
   drivers/net/ethernet/broadcom/cnic.c:2469:13: sparse:     got restricted __le32 [usertype] context_id
   drivers/net/ethernet/broadcom/cnic.c:2470:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] l5_cid @@     got restricted __le32 [usertype] conn_id @@
   drivers/net/ethernet/broadcom/cnic.c:2470:16: sparse:     expected unsigned int [usertype] l5_cid
   drivers/net/ethernet/broadcom/cnic.c:2470:16: sparse:     got restricted __le32 [usertype] conn_id
   drivers/net/ethernet/broadcom/cnic.c:2503:13: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] cid @@     got restricted __le32 [usertype] context_id @@
   drivers/net/ethernet/broadcom/cnic.c:2503:13: sparse:     expected unsigned int [usertype] cid
   drivers/net/ethernet/broadcom/cnic.c:2503:13: sparse:     got restricted __le32 [usertype] context_id
   drivers/net/ethernet/broadcom/cnic.c:2504:16: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] l5_cid @@     got restricted __le32 [usertype] conn_id @@
   drivers/net/ethernet/broadcom/cnic.c:2504:16: sparse:     expected unsigned int [usertype] l5_cid
   drivers/net/ethernet/broadcom/cnic.c:2504:16: sparse:     got restricted __le32 [usertype] conn_id
   drivers/net/ethernet/broadcom/cnic.c:2516:32: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [addressable] [usertype] completion_status @@     got int @@
   drivers/net/ethernet/broadcom/cnic.c:2516:32: sparse:     expected restricted __le32 [addressable] [usertype] completion_status
   drivers/net/ethernet/broadcom/cnic.c:2516:32: sparse:     got int
   drivers/net/ethernet/broadcom/cnic.c:2531:35: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [addressable] [assigned] [usertype] fcoe_conn_context_id @@     got unsigned int [usertype] cid @@
   drivers/net/ethernet/broadcom/cnic.c:2531:35: sparse:     expected restricted __le32 [addressable] [assigned] [usertype] fcoe_conn_context_id
   drivers/net/ethernet/broadcom/cnic.c:2531:35: sparse:     got unsigned int [usertype] cid
   drivers/net/ethernet/broadcom/cnic.c:2603:29: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [assigned] [usertype] cid @@     got restricted __le32 [usertype] context_id @@
   drivers/net/ethernet/broadcom/cnic.c:2603:29: sparse:     expected unsigned int [assigned] [usertype] cid
   drivers/net/ethernet/broadcom/cnic.c:2603:29: sparse:     got restricted __le32 [usertype] context_id
   drivers/net/ethernet/broadcom/cnic.c:2604:32: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int [usertype] l5_cid @@     got restricted __le32 [usertype] conn_id @@
   drivers/net/ethernet/broadcom/cnic.c:2604:32: sparse:     expected unsigned int [usertype] l5_cid
   drivers/net/ethernet/broadcom/cnic.c:2604:32: sparse:     got restricted __le32 [usertype] conn_id
   drivers/net/ethernet/broadcom/cnic.c:3505:40: sparse: sparse: cast to restricted __be32
   drivers/net/ethernet/broadcom/cnic.c:3506:40: sparse: sparse: cast to restricted __be32
   drivers/net/ethernet/broadcom/cnic.c:3507:40: sparse: sparse: cast to restricted __be32
   drivers/net/ethernet/broadcom/cnic.c:3508:40: sparse: sparse: cast to restricted __be32
   drivers/net/ethernet/broadcom/cnic.c:3509:40: sparse: sparse: cast to restricted __be32
   drivers/net/ethernet/broadcom/cnic.c:3510:40: sparse: sparse: cast to restricted __be32
   drivers/net/ethernet/broadcom/cnic.c:3525:27: sparse: sparse: cast to restricted __be32
   drivers/net/ethernet/broadcom/cnic.c:3526:27: sparse: sparse: cast to restricted __be32
   drivers/net/ethernet/broadcom/cnic.c:3527:29: sparse: sparse: cast to restricted __be16
   drivers/net/ethernet/broadcom/cnic.c:3528:29: sparse: sparse: cast to restricted __be16
   drivers/net/ethernet/broadcom/cnic.c:3631:49: sparse: sparse: cast to restricted __be16
   drivers/net/ethernet/broadcom/cnic.c:3783:31: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] dst_port @@     got restricted __be16 [usertype] sin6_port @@
   drivers/net/ethernet/broadcom/cnic.c:3783:31: sparse:     expected unsigned short [usertype] dst_port
   drivers/net/ethernet/broadcom/cnic.c:3783:31: sparse:     got restricted __be16 [usertype] sin6_port
   drivers/net/ethernet/broadcom/cnic.c:3789:32: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned int @@     got restricted __be32 [usertype] s_addr @@
   drivers/net/ethernet/broadcom/cnic.c:3789:32: sparse:     expected unsigned int
   drivers/net/ethernet/broadcom/cnic.c:3789:32: sparse:     got restricted __be32 [usertype] s_addr
   drivers/net/ethernet/broadcom/cnic.c:3790:31: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] dst_port @@     got restricted __be16 [usertype] sin_port @@
   drivers/net/ethernet/broadcom/cnic.c:3790:31: sparse:     expected unsigned short [usertype] dst_port
   drivers/net/ethernet/broadcom/cnic.c:3790:31: sparse:     got restricted __be16 [usertype] sin_port
   drivers/net/ethernet/broadcom/cnic.c:3820:23: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] src_port @@     got restricted __be16 [assigned] [usertype] local_port @@
   drivers/net/ethernet/broadcom/cnic.c:3820:23: sparse:     expected unsigned short [usertype] src_port
   drivers/net/ethernet/broadcom/cnic.c:3820:23: sparse:     got restricted __be16 [assigned] [usertype] local_port
   drivers/net/ethernet/broadcom/cnic.c:3977:29: sparse: sparse: restricted __le32 degrades to integer
   drivers/net/ethernet/broadcom/cnic.c:4940:43: sparse: sparse: restricted __le32 degrades to integer
>> drivers/net/ethernet/broadcom/cnic.c:4940:33: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] addr_lo @@     got unsigned int @@
   drivers/net/ethernet/broadcom/cnic.c:4940:33: sparse:     expected restricted __le32 [usertype] addr_lo
   drivers/net/ethernet/broadcom/cnic.c:4940:33: sparse:     got unsigned int
>> drivers/net/ethernet/broadcom/cnic.c:4948:46: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [usertype] parsing_data @@     got int @@
   drivers/net/ethernet/broadcom/cnic.c:4948:46: sparse:     expected restricted __le32 [usertype] parsing_data
   drivers/net/ethernet/broadcom/cnic.c:4948:46: sparse:     got int
>> drivers/net/ethernet/broadcom/cnic.c:4951:46: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 [usertype] global_data @@     got int @@
   drivers/net/ethernet/broadcom/cnic.c:4951:46: sparse:     expected restricted __le16 [usertype] global_data
   drivers/net/ethernet/broadcom/cnic.c:4951:46: sparse:     got int
>> drivers/net/ethernet/broadcom/cnic.c:4976:25: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] *tx_cons_ptr @@     got restricted __le16 * @@
   drivers/net/ethernet/broadcom/cnic.c:4976:25: sparse:     expected unsigned short [usertype] *tx_cons_ptr
   drivers/net/ethernet/broadcom/cnic.c:4976:25: sparse:     got restricted __le16 *
>> drivers/net/ethernet/broadcom/cnic.c:5041:35: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le16 [usertype] silent_vlan_mask @@     got int @@
   drivers/net/ethernet/broadcom/cnic.c:5041:35: sparse:     expected restricted __le16 [usertype] silent_vlan_mask
   drivers/net/ethernet/broadcom/cnic.c:5041:35: sparse:     got int
>> drivers/net/ethernet/broadcom/cnic.c:5043:25: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] *rx_cons_ptr @@     got restricted __le16 * @@
   drivers/net/ethernet/broadcom/cnic.c:5043:25: sparse:     expected unsigned short [usertype] *rx_cons_ptr
   drivers/net/ethernet/broadcom/cnic.c:5043:25: sparse:     got restricted __le16 *
>> drivers/net/ethernet/broadcom/cnic.c:5061:42: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] *hw_prod_idx_ptr @@     got restricted __le16 * @@
   drivers/net/ethernet/broadcom/cnic.c:5061:42: sparse:     expected unsigned short [usertype] *hw_prod_idx_ptr
   drivers/net/ethernet/broadcom/cnic.c:5061:42: sparse:     got restricted __le16 *
>> drivers/net/ethernet/broadcom/cnic.c:5063:41: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] *status_idx_ptr @@     got restricted __le16 * @@
   drivers/net/ethernet/broadcom/cnic.c:5063:41: sparse:     expected unsigned short [usertype] *status_idx_ptr
   drivers/net/ethernet/broadcom/cnic.c:5063:41: sparse:     got restricted __le16 *
   drivers/net/ethernet/broadcom/cnic.c:5068:42: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] *hw_prod_idx_ptr @@     got restricted __le16 * @@
   drivers/net/ethernet/broadcom/cnic.c:5068:42: sparse:     expected unsigned short [usertype] *hw_prod_idx_ptr
   drivers/net/ethernet/broadcom/cnic.c:5068:42: sparse:     got restricted __le16 *
   drivers/net/ethernet/broadcom/cnic.c:5070:41: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] *status_idx_ptr @@     got restricted __le16 * @@
   drivers/net/ethernet/broadcom/cnic.c:5070:41: sparse:     expected unsigned short [usertype] *status_idx_ptr
   drivers/net/ethernet/broadcom/cnic.c:5070:41: sparse:     got restricted __le16 *
   drivers/net/ethernet/broadcom/cnic.c:5080:42: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] *hw_prod_idx_ptr @@     got restricted __le16 * @@
   drivers/net/ethernet/broadcom/cnic.c:5080:42: sparse:     expected unsigned short [usertype] *hw_prod_idx_ptr
   drivers/net/ethernet/broadcom/cnic.c:5080:42: sparse:     got restricted __le16 *
   drivers/net/ethernet/broadcom/cnic.c:5082:41: sparse: sparse: incorrect type in assignment (different base types) @@     expected unsigned short [usertype] *status_idx_ptr @@     got restricted __le16 * @@
   drivers/net/ethernet/broadcom/cnic.c:5082:41: sparse:     expected unsigned short [usertype] *status_idx_ptr
   drivers/net/ethernet/broadcom/cnic.c:5082:41: sparse:     got restricted __le16 *

vim +4940 drivers/net/ethernet/broadcom/cnic.c

71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4913  
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4914  static void cnic_init_bnx2x_tx_ring(struct cnic_dev *dev,
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4915  				    struct client_init_ramrod_data *data)
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4916  {
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4917  	struct cnic_local *cp = dev->cnic_priv;
104a43edb26432 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2013-09-02  4918  	struct bnx2x *bp = netdev_priv(dev->netdev);
cd801536c236e2 drivers/net/cnic.c                   Michael Chan   2010-10-13  4919  	struct cnic_uio_dev *udev = cp->udev;
cd801536c236e2 drivers/net/cnic.c                   Michael Chan   2010-10-13  4920  	union eth_tx_bd_types *txbd = (union eth_tx_bd_types *) udev->l2_ring;
cd801536c236e2 drivers/net/cnic.c                   Michael Chan   2010-10-13  4921  	dma_addr_t buf_map, ring_map = udev->l2_ring_map;
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4922  	struct host_sp_status_block *sb = cp->bnx2x_def_status_blk;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4923  	int i;
5159fdc1e6cb40 drivers/net/cnic.c                   Michael Chan   2010-12-23  4924  	u32 cli = cp->ethdev->iscsi_l2_client_id;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4925  	u32 val;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4926  
be1fefc21433f6 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2014-03-17  4927  	memset(txbd, 0, CNIC_PAGE_SIZE);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4928  
cd801536c236e2 drivers/net/cnic.c                   Michael Chan   2010-10-13  4929  	buf_map = udev->l2_buf_map;
2bc4078e92b283 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2012-12-06  4930  	for (i = 0; i < BNX2_MAX_TX_DESC_CNT; i += 3, txbd += 3) {
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4931  		struct eth_tx_start_bd *start_bd = &txbd->start_bd;
96bed4b954fd5e drivers/net/ethernet/broadcom/cnic.c Yuval Mintz    2012-10-01  4932  		struct eth_tx_parse_bd_e1x *pbd_e1x =
96bed4b954fd5e drivers/net/ethernet/broadcom/cnic.c Yuval Mintz    2012-10-01  4933  			&((txbd + 1)->parse_bd_e1x);
96bed4b954fd5e drivers/net/ethernet/broadcom/cnic.c Yuval Mintz    2012-10-01  4934  		struct eth_tx_parse_bd_e2 *pbd_e2 = &((txbd + 1)->parse_bd_e2);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4935  		struct eth_tx_bd *reg_bd = &((txbd + 2)->reg_bd);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4936  
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4937  		start_bd->addr_hi = cpu_to_le32((u64) buf_map >> 32);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4938  		start_bd->addr_lo = cpu_to_le32(buf_map & 0xffffffff);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4939  		reg_bd->addr_hi = start_bd->addr_hi;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10 @4940  		reg_bd->addr_lo = start_bd->addr_lo + 0x10;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4941  		start_bd->nbytes = cpu_to_le16(0x10);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4942  		start_bd->nbd = cpu_to_le16(3);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4943  		start_bd->bd_flags.as_bitfield = ETH_TX_BD_FLAGS_START_BD;
96bed4b954fd5e drivers/net/ethernet/broadcom/cnic.c Yuval Mintz    2012-10-01  4944  		start_bd->general_data &= ~ETH_TX_START_BD_PARSE_NBDS;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4945  		start_bd->general_data |= (1 << ETH_TX_START_BD_HDR_NBDS_SHIFT);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4946  
104a43edb26432 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2013-09-02  4947  		if (BNX2X_CHIP_IS_E2_PLUS(bp))
96bed4b954fd5e drivers/net/ethernet/broadcom/cnic.c Yuval Mintz    2012-10-01 @4948  			pbd_e2->parsing_data = (UNICAST_ADDRESS <<
96bed4b954fd5e drivers/net/ethernet/broadcom/cnic.c Yuval Mintz    2012-10-01  4949  				ETH_TX_PARSE_BD_E2_ETH_ADDR_TYPE_SHIFT);
96bed4b954fd5e drivers/net/ethernet/broadcom/cnic.c Yuval Mintz    2012-10-01  4950  		else
96bed4b954fd5e drivers/net/ethernet/broadcom/cnic.c Yuval Mintz    2012-10-01 @4951  			pbd_e1x->global_data = (UNICAST_ADDRESS <<
96bed4b954fd5e drivers/net/ethernet/broadcom/cnic.c Yuval Mintz    2012-10-01  4952  				ETH_TX_PARSE_BD_E1X_ETH_ADDR_TYPE_SHIFT);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4953  	}
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4954  
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4955  	val = (u64) ring_map >> 32;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4956  	txbd->next_bd.addr_hi = cpu_to_le32(val);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4957  
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4958  	data->tx.tx_bd_page_base.hi = cpu_to_le32(val);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4959  
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4960  	val = (u64) ring_map & 0xffffffff;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4961  	txbd->next_bd.addr_lo = cpu_to_le32(val);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4962  
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4963  	data->tx.tx_bd_page_base.lo = cpu_to_le32(val);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4964  
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4965  	/* Other ramrod params */
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4966  	data->tx.tx_sb_index_number = HC_SP_INDEX_ETH_ISCSI_CQ_CONS;
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4967  	data->tx.tx_status_block_id = BNX2X_DEF_SB_ID;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4968  
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4969  	/* reset xstorm per client statistics */
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4970  	if (cli < MAX_STAT_COUNTER_ID) {
619c5cb6885b93 drivers/net/cnic.c                   Vlad Zolotarov 2011-06-14  4971  		data->general.statistics_zero_flg = 1;
619c5cb6885b93 drivers/net/cnic.c                   Vlad Zolotarov 2011-06-14  4972  		data->general.statistics_en_flg = 1;
619c5cb6885b93 drivers/net/cnic.c                   Vlad Zolotarov 2011-06-14  4973  		data->general.statistics_counter_id = cli;
6b2a541db58dba drivers/net/cnic.c                   Dmitry Kravkov 2010-06-23  4974  	}
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4975  
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10 @4976  	cp->tx_cons_ptr =
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4977  		&sb->sp_sb.index_values[HC_SP_INDEX_ETH_ISCSI_CQ_CONS];
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4978  }
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4979  
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4980  static void cnic_init_bnx2x_rx_ring(struct cnic_dev *dev,
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4981  				    struct client_init_ramrod_data *data)
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4982  {
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4983  	struct cnic_local *cp = dev->cnic_priv;
104a43edb26432 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2013-09-02  4984  	struct bnx2x *bp = netdev_priv(dev->netdev);
cd801536c236e2 drivers/net/cnic.c                   Michael Chan   2010-10-13  4985  	struct cnic_uio_dev *udev = cp->udev;
cd801536c236e2 drivers/net/cnic.c                   Michael Chan   2010-10-13  4986  	struct eth_rx_bd *rxbd = (struct eth_rx_bd *) (udev->l2_ring +
be1fefc21433f6 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2014-03-17  4987  				CNIC_PAGE_SIZE);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4988  	struct eth_rx_cqe_next_page *rxcqe = (struct eth_rx_cqe_next_page *)
be1fefc21433f6 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2014-03-17  4989  				(udev->l2_ring + (2 * CNIC_PAGE_SIZE));
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4990  	struct host_sp_status_block *sb = cp->bnx2x_def_status_blk;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4991  	int i;
5159fdc1e6cb40 drivers/net/cnic.c                   Michael Chan   2010-12-23  4992  	u32 cli = cp->ethdev->iscsi_l2_client_id;
104a43edb26432 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2013-09-02  4993  	int cl_qzone_id = BNX2X_CL_QZONE_ID(bp, cli);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  4994  	u32 val;
cd801536c236e2 drivers/net/cnic.c                   Michael Chan   2010-10-13  4995  	dma_addr_t ring_map = udev->l2_ring_map;
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4996  
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4997  	/* General data */
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4998  	data->general.client_id = cli;
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  4999  	data->general.activate_flg = 1;
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  5000  	data->general.sp_client_id = cli;
619c5cb6885b93 drivers/net/cnic.c                   Vlad Zolotarov 2011-06-14  5001  	data->general.mtu = cpu_to_le16(cp->l2_single_buf_size - 14);
a5b3c4ae27f0f6 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2013-09-02  5002  	data->general.func_id = bp->pfid;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5003  
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5004  	for (i = 0; i < BNX2X_MAX_RX_DESC_CNT; i++, rxbd++) {
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5005  		dma_addr_t buf_map;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5006  		int n = (i % cp->l2_rx_ring_size) + 1;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5007  
cd801536c236e2 drivers/net/cnic.c                   Michael Chan   2010-10-13  5008  		buf_map = udev->l2_buf_map + (n * cp->l2_single_buf_size);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5009  		rxbd->addr_hi = cpu_to_le32((u64) buf_map >> 32);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5010  		rxbd->addr_lo = cpu_to_le32(buf_map & 0xffffffff);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5011  	}
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5012  
be1fefc21433f6 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2014-03-17  5013  	val = (u64) (ring_map + CNIC_PAGE_SIZE) >> 32;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5014  	rxbd->addr_hi = cpu_to_le32(val);
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  5015  	data->rx.bd_page_base.hi = cpu_to_le32(val);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5016  
be1fefc21433f6 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2014-03-17  5017  	val = (u64) (ring_map + CNIC_PAGE_SIZE) & 0xffffffff;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5018  	rxbd->addr_lo = cpu_to_le32(val);
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  5019  	data->rx.bd_page_base.lo = cpu_to_le32(val);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5020  
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5021  	rxcqe += BNX2X_MAX_RCQ_DESC_CNT;
be1fefc21433f6 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2014-03-17  5022  	val = (u64) (ring_map + (2 * CNIC_PAGE_SIZE)) >> 32;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5023  	rxcqe->addr_hi = cpu_to_le32(val);
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  5024  	data->rx.cqe_page_base.hi = cpu_to_le32(val);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5025  
be1fefc21433f6 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2014-03-17  5026  	val = (u64) (ring_map + (2 * CNIC_PAGE_SIZE)) & 0xffffffff;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5027  	rxcqe->addr_lo = cpu_to_le32(val);
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  5028  	data->rx.cqe_page_base.lo = cpu_to_le32(val);
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5029  
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  5030  	/* Other ramrod params */
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  5031  	data->rx.client_qzone_id = cl_qzone_id;
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  5032  	data->rx.rx_sb_index_number = HC_SP_INDEX_ETH_ISCSI_RX_CQ_CONS;
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  5033  	data->rx.status_block_id = BNX2X_DEF_SB_ID;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5034  
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  5035  	data->rx.cache_line_alignment_log_size = L1_CACHE_SHIFT;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5036  
619c5cb6885b93 drivers/net/cnic.c                   Vlad Zolotarov 2011-06-14  5037  	data->rx.max_bytes_on_bd = cpu_to_le16(cp->l2_single_buf_size);
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  5038  	data->rx.outer_vlan_removal_enable_flg = 1;
619c5cb6885b93 drivers/net/cnic.c                   Vlad Zolotarov 2011-06-14  5039  	data->rx.silent_vlan_removal_flg = 1;
619c5cb6885b93 drivers/net/cnic.c                   Vlad Zolotarov 2011-06-14  5040  	data->rx.silent_vlan_value = 0;
619c5cb6885b93 drivers/net/cnic.c                   Vlad Zolotarov 2011-06-14 @5041  	data->rx.silent_vlan_mask = 0xffff;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5042  
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10 @5043  	cp->rx_cons_ptr =
523224a3b3cd40 drivers/net/cnic.c                   Dmitry Kravkov 2010-10-06  5044  		&sb->sp_sb.index_values[HC_SP_INDEX_ETH_ISCSI_RX_CQ_CONS];
5159fdc1e6cb40 drivers/net/cnic.c                   Michael Chan   2010-12-23  5045  	cp->rx_cons = *cp->rx_cons_ptr;
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5046  }
71034ba845c9ff drivers/net/cnic.c                   Michael Chan   2009-10-10  5047  
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5048  static void cnic_init_bnx2x_kcq(struct cnic_dev *dev)
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5049  {
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5050  	struct cnic_local *cp = dev->cnic_priv;
68c64d2034faa0 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2012-12-06  5051  	struct bnx2x *bp = netdev_priv(dev->netdev);
a5b3c4ae27f0f6 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2013-09-02  5052  	u32 pfid = bp->pfid;
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5053  
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5054  	cp->kcq1.io_addr = BAR_CSTRORM_INTMEM +
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5055  			   CSTORM_ISCSI_EQ_PROD_OFFSET(pfid, 0);
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5056  	cp->kcq1.sw_prod_idx = 0;
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5057  
104a43edb26432 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2013-09-02  5058  	if (BNX2X_CHIP_IS_E2_PLUS(bp)) {
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5059  		struct host_hc_status_block_e2 *sb = cp->status_blk.gen;
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5060  
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23 @5061  		cp->kcq1.hw_prod_idx_ptr =
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5062  			&sb->sb.index_values[HC_INDEX_ISCSI_EQ_CONS];
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23 @5063  		cp->kcq1.status_idx_ptr =
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5064  			&sb->sb.running_index[SM_RX_ID];
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5065  	} else {
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5066  		struct host_hc_status_block_e1x *sb = cp->status_blk.gen;
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5067  
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5068  		cp->kcq1.hw_prod_idx_ptr =
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5069  			&sb->sb.index_values[HC_INDEX_ISCSI_EQ_CONS];
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5070  		cp->kcq1.status_idx_ptr =
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5071  			&sb->sb.running_index[SM_RX_ID];
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5072  	}
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5073  
104a43edb26432 drivers/net/ethernet/broadcom/cnic.c Michael Chan   2013-09-02  5074  	if (BNX2X_CHIP_IS_E2_PLUS(bp)) {
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5075  		struct host_hc_status_block_e2 *sb = cp->status_blk.gen;
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5076  
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5077  		cp->kcq2.io_addr = BAR_USTRORM_INTMEM +
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5078  					USTORM_FCOE_EQ_PROD_OFFSET(pfid);
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5079  		cp->kcq2.sw_prod_idx = 0;
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5080  		cp->kcq2.hw_prod_idx_ptr =
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5081  			&sb->sb.index_values[HC_INDEX_FCOE_EQ_CONS];
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5082  		cp->kcq2.status_idx_ptr =
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5083  			&sb->sb.running_index[SM_RX_ID];
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5084  	}
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5085  }
e21ba414eed8a2 drivers/net/cnic.c                   Michael Chan   2010-12-23  5086  

:::::: The code at line 4940 was first introduced by commit
:::::: 71034ba845c9ff219373066f904286c0b7506922 cnic: Add main functions to support bnx2x devices.

:::::: TO: Michael Chan <mchan@xxxxxxxxxxxx>
:::::: CC: David S. Miller <davem@xxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux