Re: CS8900 problem on reboot

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

 



Robert Schwebel wrote:
> 
> Andrew,
> 
> On Sat, Jun 15, 2002 at 12:38:16AM -0700, Andrew Morton wrote:
> > Where on earth did that 0x3138 come from?
> >
> > Could you send the kernel output from a successful probe?  It
> > would help to set the debug level higher. Change `DEBUGGING'
> > to 7 at line 107 of the driver.
> 
> tonight I had some time to investigate this further. I can easily fix the
> problem with this patch:
> 
> ----------8<----------
> --- /home/robert/embedded/linux-2.4.18/drivers/net/cs89x0.c     Mon Feb 25 20:37:59 2002
> +++ cs89x0.c    Sat Jun 22 00:53:55 2002
> @@ -411,7 +411,8 @@
>                 ioaddr &= ~3;
>                 outw(PP_ChipID, ioaddr + ADD_PORT);
>         }
> -printk("PP_addr=0x%x\n", inw(ioaddr + ADD_PORT));
> +
> +       outw(PP_ChipID, ioaddr + ADD_PORT);
> 
>          if (inw(ioaddr + DATA_PORT) != CHIP_EISA_ID_SIG) {
>                 printk(KERN_ERR "%s: incorrect signature 0x%x\n",
> ---------->8----------
> 
> This simply accesses the ChipID register directly. But I assume I don't
> understand the magic directly before the replaced line. What's the
> intention behind this odd-baseaddress stuff? I have the impression that the
> code assumes that on startup the ADD_PORT is preinitialized to zero, which
> might not be the case after a soft reboot.
> 
> What do you think, is there a better way to fix the problem?

cs89x0.txt says:

c) The driver's hardware probe routine is designed to avoid
   writing to I/O space until it knows that there is a cs89x0
   card at the written addresses.  This could cause problems
   with device probing.  To avoid this behaviour, add one
   to the `io=' module parameter.  This doesn't actually change
   the I/O address, but it is a flag to tell the driver
   topartially initialise the hardware before trying to
   identify the card.  This could be dangerous if you are
   not sure that there is a cs89x0 card at the provided address.

   For example, to scan for an adapter located at IO base 0x300,
   specify an IO address of 0x301.  


And I think I wrote that.   Frankly, I don't know what would happen
if we were to unconditionally write to all the IO addresses at which
a cs89x0 card can reside.  Bad things, most probably.

Can you do that?  Just specify `ioaddr=0x301' in modules.conf,
or the kernel boot line?

-
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux