freebsd-skq/sys
Bill Paul 06794990cb Fix two problems:
- In subr_ndis.c:ndis_allocate_sharemem(), create the busdma tags
  used for shared memory allocations with a lowaddr of 0x3E7FFFFF.
  This forces the buffers to be mapped to physical/bus addresses within
  the first 1GB of physical memory. It seems that at least one card
  (Linksys Instant Wireless PCI V2.7) depends on this behavior. I
  don't know if this is a hardware restriction, or if the NDIS
  driver for this card is truncating the addresses itself, but using
  physical/bus addresses beyong the 1GB limit causes initialization
  failures.

- Create am NDIS_INITIALIZED() macro in if_ndisvar.h and use it in
  if_ndis.c to test whether the device has been initialized rather
  than checking for the presence of the IFF_UP flag in if_flags.
  While debugging the previous problem, I noticed that bringing
  up the device would always produce failures from ndis_setmulti().
  It turns out that the following steps now occur during device
  initialization:

	- IFF_UP flag is set in if_flags
	- ifp->if_ioctl() called with SIOCSIFADDR (which we don't handle)
	- ifp->if_ioctl() called with SIOCADDMULTI
	- ifp->if_ioctl() called with SIOCADDMULTI (again)
	- ifp->if_ioctl() called with SIOCADDMULTI (yet again)
	- ifp->if_ioctl() called with SIOCSIFFLAGS

  Setting the receive filter and multicast filters can only be done
  when the underlying NDIS driver has been initialized, which is done
  by ifp->if_init(). However, we don't call ifp->if_init() until
  ifp->if_ioctl() is called with SIOCSIFFLAGS and IFF_UP has been
  set. It appears that now, the network stack tries to add multicast
  addresses to interface's filter before those steps occur. Normally,
  ndis_setmulti() would trap this condition by checking for the IFF_UP
  flag, but the network code has in fact set this flag already, so
  ndis_setmulti() is fooled into thinking the interface has been
  initialized when it really hasn't.

  It turns out this is usually harmless because the ifp->if_init()
  routine (in this case ndis_init()) will set up the multicast
  filter when it initializes the hardware anyway, and the underlying
  routines (ndis_get_info()/ndis_set_info()) know that the driver/NIC
  haven't been initialized yet, but you end up spurious error messages
  on the console all the time.

Something tells me this new behavior isn't really correct. I think
the intention was to fix it so that ifp->if_init() is only called
once when we ifconfig an interface up, but the end result seems a
little bogus: the change of the IFF_UP flag should be propagated
down to the driver before calling any other ioctl() that might actually
require the hardware to be up and running.
2004-07-07 17:46:30 +00:00
..
alpha Add pmap locking to pmap_protect(). 2004-07-07 04:16:22 +00:00
amd64 Simplify the control flow in pmap_extract(), enabling the elimination of a 2004-07-07 16:47:58 +00:00
arm Correct pmap_extract()'s return type. It should be vm_paddr_t, not 2004-07-05 23:08:27 +00:00
boot Consistently use __inline instead of __inline__ as the former is an empty macro 2004-07-04 16:11:03 +00:00
cam Revert rev 1.140, it was a bit pre-mature. 2004-06-21 19:01:55 +00:00
coda When we traverse the vnodes on a mountpoint we need to look out for 2004-07-04 08:52:35 +00:00
compat Fix two problems: 2004-07-07 17:46:30 +00:00
conf By popular request, add a workaround that allows large (>128GB or so) 2004-07-03 13:22:38 +00:00
contrib Local change: Allow access to the field if it is within the region 2004-07-02 08:38:55 +00:00
crypto
ddb
dev Fix two problems: 2004-07-07 17:46:30 +00:00
fs When we traverse the vnodes on a mountpoint we need to look out for 2004-07-04 08:52:35 +00:00
geom Add missing argument. 2004-07-06 17:06:54 +00:00
gnu When we traverse the vnodes on a mountpoint we need to look out for 2004-07-04 08:52:35 +00:00
i4b Catch up with the new world order of Netgraph metas. 2004-07-06 06:43:45 +00:00
i386 Simplify the control flow in pmap_extract(), enabling the elimination of a 2004-07-07 16:47:58 +00:00
ia64 - Correct pmap_extract()'s return type. It should be vm_paddr_t, not 2004-07-05 23:18:48 +00:00
isa These option roms are defined in the ISA standard, and in the ISA 2004-07-05 17:26:04 +00:00
isofs/cd9660 Remove "register" keyword and trailing white space. 2004-07-03 16:56:45 +00:00
kern style(9) 2004-07-07 07:00:02 +00:00
libkern
modules By popular request, add a workaround that allows large (>128GB or so) 2004-07-03 13:22:38 +00:00
net Use M_ZERO instead of bzero(). 2004-07-06 03:34:16 +00:00
net80211
netatalk
netatm
netgraph Consistently use __inline instead of __inline__ as the former is an empty macro 2004-07-04 16:11:03 +00:00
netinet Push WARNS back up to 6, but define NO_WERROR; I want the warts out in the 2004-07-06 12:15:24 +00:00
netinet6
netipsec Add required includes for post-sorwakeup() change to fix FAST_IPSEC 2004-06-23 01:58:22 +00:00
netipx Acquire the receive socket buffer lock when modifying out-of-band 2004-06-24 04:29:53 +00:00
netkey Merge next step in socket buffer locking: 2004-06-21 00:20:43 +00:00
netnatm Constify send and receive space constants in natm. 2004-06-24 03:11:29 +00:00
netncp
netsmb
nfs
nfs4client When we traverse the vnodes on a mountpoint we need to look out for 2004-07-04 08:52:35 +00:00
nfsclient Acquire socket lock in nfs_connect() connection/sleep loop to protect 2004-07-06 16:55:41 +00:00
nfsserver Change M_WAITOK argument to sodupsockaddr() to M_NOWAIT. When the call 2004-07-03 19:17:06 +00:00
opencrypto
pc98 MFi386: revision 1.1163 2004-07-01 09:34:15 +00:00
pccard
pci Whitespace nit 2004-07-05 22:52:01 +00:00
posix4
powerpc - trailing white-space cleanup 2004-07-06 11:46:56 +00:00
rpc
security Introduce a temporary mutex, mac_ifnet_mtx, to lock MAC labels on 2004-06-24 03:34:46 +00:00
sparc64 These don't need RMAN_RESOURCE_VISIBLE now that rman is visible 2004-07-03 20:56:16 +00:00
sys do the vfsstd thing instead of messing up our VFS_SYSCTL macro. 2004-07-07 06:58:29 +00:00
tools Complete quirk handling script by matching the in-kernel table format. 2004-06-30 04:40:20 +00:00
ufs When we traverse the vnodes on a mountpoint we need to look out for 2004-07-04 08:52:35 +00:00
vm Micro-optimize vmspace for 64-bit architectures: Colocate vm_refcnt and 2004-07-06 17:35:10 +00:00
Makefile