Date: Wed, 21 Apr 1999 10:26:48 -0700 From: Ted Faber <faber@ISI.EDU> To: Ben Black <black@layer8.net> Cc: freebsd-hackers@freebsd.org, paul@originative.co.uk (Paul Richards) Subject: Re: PCnet/PCI still broken in -stable? Message-ID: <199904211726.KAA15016@boreas.isi.edu> In-Reply-To: Your message of "Wed, 21 Apr 1999 04:49:21 PDT." <19990421044920.J98028@layer8.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Ben Black wrote: >I've got an IBM 325 server with integrated PCnet/PCI ethernet which >worked fine under 3.1-release, but now does nothing but spew >device timeout -- resetting messages in -stable. I saw an exchange from >September indicating a patch to fix a similar sounding problem. > >Any ideas? Sure. Try this. I submitted a similar patch to Paul Richards, and although it works for him in general, someone's having a problem with a combination SCSI-PCnet/PCI ethernet so he hasn't committed it. Paul: this patch is slightly different than the one I mailed you originally. For some reason, unfathomable to me now, the patch I sent you has the driver becoming a bus master *after* it calls the pci attach routine, not before. This is almost certainly a bug, and I wouldn't be surprised if it was causing the problems with the SCSI card (of course, I wouldn't be surprised if it wasn't :-)). Give this new patch a try and see if it helps. The patch is relative to the /sys directory on 3.1-RELEASE, but you should be able to apply it manually if it doesn't work on -stable. Let me know of any problems or comments. *** pci/if_lnc_p.c.orig Mon Mar 8 21:38:19 1999 --- pci/if_lnc_p.c Wed Apr 21 10:13:39 1999 *************** *** 72,88 **** int unit; { unsigned iobase; void *lnc; /* device specific data for interrupt handler ... */ - /* pci_map_port correctly initializes bridge chips -- tvf */ - if ( !pci_map_port(config_id,PCI_MAP_REG_START,(u_short *)&iobase) ) printf("lnc%d: pci_port_map_attach failed?!\n",unit); lnc = lnc_attach_ne2100_pci(unit, iobase); if (!lnc) return; - if(!(pci_map_int(config_id, lncintr_sc, (void *)lnc, &net_imask))) { free (lnc, M_DEVBUF); return; --- 72,95 ---- int unit; { unsigned iobase; + unsigned data; /* scratch to make this device a bus master*/ void *lnc; /* device specific data for interrupt handler ... */ if ( !pci_map_port(config_id,PCI_MAP_REG_START,(u_short *)&iobase) ) printf("lnc%d: pci_port_map_attach failed?!\n",unit); + + /* Make this device a bus master. This was implictly done by + pci_map_port under 2.2.x -- tvf */ + + data = pci_cfgread(config_id, PCIR_COMMAND, 4); + data |= PCIM_CMD_PORTEN | PCIM_CMD_BUSMASTEREN; + pci_cfgwrite(config_id, PCIR_COMMAND, data, 4); + lnc = lnc_attach_ne2100_pci(unit, iobase); + if (!lnc) return; if(!(pci_map_int(config_id, lncintr_sc, (void *)lnc, &net_imask))) { free (lnc, M_DEVBUF); return; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199904211726.KAA15016>