lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202111181921.JY6bdgWw-lkp@intel.com>
Date:   Thu, 18 Nov 2021 19:36:25 +0800
From:   kernel test robot <lkp@...el.com>
To:     Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net
Cc:     kbuild-all@...ts.01.org, netdev@...r.kernel.org,
        Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH net-next 5/9] net: constify netdev->dev_addr

Hi Jakub,

I love your patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Jakub-Kicinski/net-constify-netdev-dev_addr/20211118-121649
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 75082e7f46809432131749f4ecea66864d0f7438
config: m68k-allyesconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/ea5373ba01c0915c0dceb67e2df2b05343642b84
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jakub-Kicinski/net-constify-netdev-dev_addr/20211118-121649
        git checkout ea5373ba01c0915c0dceb67e2df2b05343642b84
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k 

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

All errors (new ones prefixed by >>):

   drivers/net/ethernet/smsc/smc9194.c: In function 'smc_probe':
>> drivers/net/ethernet/smsc/smc9194.c:927:39: error: assignment of read-only location '*(dev->dev_addr + ((sizetype)i + 1))'
     927 |                 dev->dev_addr[ i + 1] = address >> 8;
         |                                       ^
   drivers/net/ethernet/smsc/smc9194.c:928:36: error: assignment of read-only location '*(dev->dev_addr + (sizetype)i)'
     928 |                 dev->dev_addr[ i ] = address & 0xFF;
         |                                    ^


vim +927 drivers/net/ethernet/smsc/smc9194.c

32670c36d0222e drivers/net/smc9194.c               Stephen Hemminger 2009-03-26   815  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   816  /*----------------------------------------------------------------------
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   817   . Function: smc_probe( int ioaddr )
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   818   .
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   819   . Purpose:
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   820   .	Tests to see if a given ioaddr points to an SMC9xxx chip.
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   821   .	Returns a 0 on success
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   822   .
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   823   . Algorithm:
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   824   .	(1) see if the high byte of BANK_SELECT is 0x33
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   825   . 	(2) compare the ioaddr with the base register's address
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   826   .	(3) see if I recognize the chip ID in the appropriate register
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   827   .
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   828   .---------------------------------------------------------------------
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   829   */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   830  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   831  /*---------------------------------------------------------------
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   832   . Here I do typical initialization tasks.
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   833   .
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   834   . o  Initialize the structure if needed
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   835   . o  print out my vanity message if not done so already
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   836   . o  print out what type of hardware is detected
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   837   . o  print out the ethernet address
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   838   . o  find the IRQ
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   839   . o  set up my private data
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   840   . o  configure the dev structure with my subroutines
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   841   . o  actually GRAB the irq.
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   842   . o  GRAB the region
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   843   .-----------------------------------------------------------------
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   844  */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   845  static int __init smc_probe(struct net_device *dev, int ioaddr)
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   846  {
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   847  	int i, memory, retval;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   848  	unsigned int bank;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   849  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   850  	const char *version_string;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   851  	const char *if_string;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   852  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   853  	/* registers */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   854  	word revision_register;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   855  	word base_address_register;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   856  	word configuration_register;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   857  	word memory_info_register;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   858  	word memory_cfg_register;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   859  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   860  	/* Grab the region so that no one else tries to probe our ioports. */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   861  	if (!request_region(ioaddr, SMC_IO_EXTENT, DRV_NAME))
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   862  		return -EBUSY;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   863  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   864  	dev->irq = irq;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   865  	dev->if_port = ifport;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   866  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   867  	/* First, see if the high byte is 0x33 */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   868  	bank = inw( ioaddr + BANK_SELECT );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   869  	if ( (bank & 0xFF00) != 0x3300 ) {
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   870  		retval = -ENODEV;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   871  		goto err_out;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   872  	}
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   873  	/* The above MIGHT indicate a device, but I need to write to further
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   874  		test this.  */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   875  	outw( 0x0, ioaddr + BANK_SELECT );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   876  	bank = inw( ioaddr + BANK_SELECT );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   877  	if ( (bank & 0xFF00 ) != 0x3300 ) {
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   878  		retval = -ENODEV;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   879  		goto err_out;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   880  	}
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   881  	/* well, we've already written once, so hopefully another time won't
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   882  	   hurt.  This time, I need to switch the bank register to bank 1,
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   883  	   so I can access the base address register */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   884  	SMC_SELECT_BANK(1);
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   885  	base_address_register = inw( ioaddr + BASE );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   886  	if ( ioaddr != ( base_address_register >> 3 & 0x3E0 ) )  {
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   887  		printk(CARDNAME ": IOADDR %x doesn't match configuration (%x). "
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   888  			"Probably not a SMC chip\n",
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   889  			ioaddr, base_address_register >> 3 & 0x3E0 );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   890  		/* well, the base address register didn't match.  Must not have
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   891  		   been a SMC chip after all. */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   892  		retval = -ENODEV;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   893  		goto err_out;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   894  	}
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   895  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   896  	/*  check if the revision register is something that I recognize.
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   897  	    These might need to be added to later, as future revisions
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   898  	    could be added.  */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   899  	SMC_SELECT_BANK(3);
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   900  	revision_register  = inw( ioaddr + REVISION );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   901  	if ( !chip_ids[ ( revision_register  >> 4 ) & 0xF  ] ) {
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   902  		/* I don't recognize this chip, so... */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   903  		printk(CARDNAME ": IO %x: Unrecognized revision register:"
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   904  			" %x, Contact author.\n", ioaddr, revision_register);
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   905  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   906  		retval = -ENODEV;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   907  		goto err_out;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   908  	}
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   909  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   910  	/* at this point I'll assume that the chip is an SMC9xxx.
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   911  	   It might be prudent to check a listing of MAC addresses
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   912  	   against the hardware address, or do some other tests. */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   913  
2ad02bdc885db5 drivers/net/ethernet/smsc/smc9194.c Ben Boeckel       2013-11-01   914  	pr_info_once("%s\n", version);
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   915  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   916  	/* fill in some of the fields */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   917  	dev->base_addr = ioaddr;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   918  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   919  	/*
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   920  	 . Get the MAC address ( bank 1, regs 4 - 9 )
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   921  	*/
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   922  	SMC_SELECT_BANK( 1 );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   923  	for ( i = 0; i < 6; i += 2 ) {
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   924  		word	address;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   925  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   926  		address = inw( ioaddr + ADDR0 + i  );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  @927  		dev->dev_addr[ i + 1] = address >> 8;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   928  		dev->dev_addr[ i ] = address & 0xFF;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   929  	}
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   930  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   931  	/* get the memory information */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   932  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   933  	SMC_SELECT_BANK( 0 );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   934  	memory_info_register = inw( ioaddr + MIR );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   935  	memory_cfg_register  = inw( ioaddr + MCR );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   936  	memory = ( memory_cfg_register >> 9 )  & 0x7;  /* multiplier */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   937  	memory *= 256 * ( memory_info_register & 0xFF );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   938  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   939  	/*
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   940  	 Now, I want to find out more about the chip.  This is sort of
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   941  	 redundant, but it's cleaner to have it in both, rather than having
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   942  	 one VERY long probe procedure.
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   943  	*/
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   944  	SMC_SELECT_BANK(3);
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   945  	revision_register  = inw( ioaddr + REVISION );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   946  	version_string = chip_ids[ ( revision_register  >> 4 ) & 0xF  ];
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   947  	if ( !version_string ) {
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   948  		/* I shouldn't get here because this call was done before.... */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   949  		retval = -ENODEV;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   950  		goto err_out;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   951  	}
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   952  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   953  	/* is it using AUI or 10BaseT ? */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   954  	if ( dev->if_port == 0 ) {
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   955  		SMC_SELECT_BANK(1);
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   956  		configuration_register = inw( ioaddr + CONFIG );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   957  		if ( configuration_register & CFG_AUI_SELECT )
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   958  			dev->if_port = 2;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   959  		else
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   960  			dev->if_port = 1;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   961  	}
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   962  	if_string = interfaces[ dev->if_port - 1 ];
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   963  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   964  	/* now, reset the chip, and put it into a known state */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   965  	smc_reset( ioaddr );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   966  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   967  	/*
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   968  	 . If dev->irq is 0, then the device has to be banged on to see
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   969  	 . what the IRQ is.
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   970  	 .
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   971  	 . This banging doesn't always detect the IRQ, for unknown reasons.
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   972  	 . a workaround is to reset the chip and try again.
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   973  	 .
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   974  	 . Interestingly, the DOS packet driver *SETS* the IRQ on the card to
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   975  	 . be what is requested on the command line.   I don't do that, mostly
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   976  	 . because the card that I have uses a non-standard method of accessing
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   977  	 . the IRQs, and because this _should_ work in most configurations.
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   978  	 .
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   979  	 . Specifying an IRQ is done with the assumption that the user knows
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   980  	 . what (s)he is doing.  No checking is done!!!!
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   981  	 .
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   982  	*/
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   983  	if ( dev->irq < 2 ) {
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   984  		int	trials;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   985  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   986  		trials = 3;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   987  		while ( trials-- ) {
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   988  			dev->irq = smc_findirq( ioaddr );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   989  			if ( dev->irq )
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   990  				break;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   991  			/* kick the card and try again */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   992  			smc_reset( ioaddr );
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   993  		}
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   994  	}
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   995  	if (dev->irq == 0 ) {
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   996  		printk(CARDNAME": Couldn't autodetect your IRQ. Use irq=xx.\n");
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   997  		retval = -ENODEV;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   998  		goto err_out;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16   999  	}
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1000  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1001  	/* now, print out the card info, in a short format.. */
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1002  
2ad02bdc885db5 drivers/net/ethernet/smsc/smc9194.c Ben Boeckel       2013-11-01  1003  	netdev_info(dev, "%s(r:%d) at %#3x IRQ:%d INTF:%s MEM:%db ",
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1004  		    version_string, revision_register & 0xF, ioaddr, dev->irq,
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1005  		    if_string, memory);
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1006  	/*
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1007  	 . Print the Ethernet address
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1008  	*/
2ad02bdc885db5 drivers/net/ethernet/smsc/smc9194.c Ben Boeckel       2013-11-01  1009  	netdev_info(dev, "ADDR: %pM\n", dev->dev_addr);
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1010  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1011  	/* Grab the IRQ */
a0607fd3a25ba1 drivers/net/smc9194.c               Joe Perches       2009-11-18  1012  	retval = request_irq(dev->irq, smc_interrupt, 0, DRV_NAME, dev);
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1013  	if (retval) {
2ad02bdc885db5 drivers/net/ethernet/smsc/smc9194.c Ben Boeckel       2013-11-01  1014  		netdev_warn(dev, "%s: unable to get IRQ %d (irqval=%d).\n",
2ad02bdc885db5 drivers/net/ethernet/smsc/smc9194.c Ben Boeckel       2013-11-01  1015  			    DRV_NAME, dev->irq, retval);
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1016  		goto err_out;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1017  	}
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1018  
32670c36d0222e drivers/net/smc9194.c               Stephen Hemminger 2009-03-26  1019  	dev->netdev_ops			= &smc_netdev_ops;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1020  	dev->watchdog_timeo		= HZ/20;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1021  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1022  	return 0;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1023  
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1024  err_out:
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1025  	release_region(ioaddr, SMC_IO_EXTENT);
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1026  	return retval;
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1027  }
^1da177e4c3f41 drivers/net/smc9194.c               Linus Torvalds    2005-04-16  1028  

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

Download attachment ".config.gz" of type "application/gzip" (62370 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ