<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/if_ndis, branch release/5.3.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2004-11-04T19:12:42+00:00</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2004-11-04T19:12:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3f86d8a2ea3f3265afaa1fd263b0004c5c000e69'/>
<id>3f86d8a2ea3f3265afaa1fd263b0004c5c000e69</id>
<content type='text'>
'RELENG_5_3_0_RELEASE'.

This commit was manufactured to restore the state of the 5.3-RELEASE image.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
'RELENG_5_3_0_RELEASE'.

This commit was manufactured to restore the state of the 5.3-RELEASE image.
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC rev. 1.71:</title>
<updated>2004-10-23T18:58:53+00:00</updated>
<author>
<name>Lukas Ertl</name>
<email>le@FreeBSD.org</email>
</author>
<published>2004-10-23T18:58:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9803afcf5cf662e6d124efd9498ff40123200f9b'/>
<id>9803afcf5cf662e6d124efd9498ff40123200f9b</id>
<content type='text'>
  Drop the NDIS lock before returning from ndis_start().

  PR:             i386/72795
  Submitted by:   Frank Mayhar &lt;frank@exit.com&gt;

Approved by:  re@ (scottl)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  Drop the NDIS lock before returning from ndis_start().

  PR:             i386/72795
  Submitted by:   Frank Mayhar &lt;frank@exit.com&gt;

Approved by:  re@ (scottl)
</pre>
</div>
</content>
</entry>
<entry>
<title>MFC:</title>
<updated>2004-10-09T15:20:18+00:00</updated>
<author>
<name>Max Laier</name>
<email>mlaier@FreeBSD.org</email>
</author>
<published>2004-10-09T15:20:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=23db2fa1dfd5dd6ff03940578d4218b65633da21'/>
<id>23db2fa1dfd5dd6ff03940578d4218b65633da21</id>
<content type='text'>
  Fix sis, bfe and ndis in the same way dc was fixed:
    Do not tell the hardware to send when there were no packets enqueued.

  Found and reviewed by: green

Approved by:	re (scottl)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
  Fix sis, bfe and ndis in the same way dc was fixed:
    Do not tell the hardware to send when there were no packets enqueued.

  Found and reviewed by: green

Approved by:	re (scottl)
</pre>
</div>
</content>
</entry>
<entry>
<title>Make the Texas Instruments 802.11g chipset work with the NDISulator.</title>
<updated>2004-08-16T18:50:20+00:00</updated>
<author>
<name>Bill Paul</name>
<email>wpaul@FreeBSD.org</email>
</author>
<published>2004-08-16T18:50:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f454f98c318514d77a820302e3820ebd39a0e9b8'/>
<id>f454f98c318514d77a820302e3820ebd39a0e9b8</id>
<content type='text'>
This was tested with a Netgear WG311v2 802.11b/g PCI card. Things
that were fixed:

- This chip has two memory mapped regions, one at PCIR_BAR(0) and the
  other at PCIR_BAR(1). This is a little different from the other
  chips I've seen with two PCI shared memory regions, since they tend
  to have the second BAR ad PCIR_BAR(2). if_ndis_pci.c tests explicitly
  for PCIR_BAR(2). This has been changed to simply fill in ndis_res_mem
  first and ndis_res_altmem second, if a second shared memory range
  exists. Given that NDIS drivers seem to scan for BARs in ascending
  order, I think this should be ok.

- Fixed the code that tries to process firmware images that have been
  loaded as .ko files. To save a step, I was setting up the address
  mapping in ndis_open_file(), but ndis_map_file() flags pre-existing
  mappings as an error (to avoid duplicate mappings). Changed this so
  that the mapping is now donw in ndis_map_file() as expected.

- Made the typedef for 'driver_entry' explicitly include __stdcall
  to silence gcc warning in ndis_load_driver().

NOTE: the Texas Instruments ACX111 driver needs firmware. With my
card, there were 3 .bin files shipped with the driver. You must
either put these files in /compat/ndis or convert them with
ndiscvt -f and kldload them so the driver can use them. Without
the firmware image, the NIC won't work.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was tested with a Netgear WG311v2 802.11b/g PCI card. Things
that were fixed:

- This chip has two memory mapped regions, one at PCIR_BAR(0) and the
  other at PCIR_BAR(1). This is a little different from the other
  chips I've seen with two PCI shared memory regions, since they tend
  to have the second BAR ad PCIR_BAR(2). if_ndis_pci.c tests explicitly
  for PCIR_BAR(2). This has been changed to simply fill in ndis_res_mem
  first and ndis_res_altmem second, if a second shared memory range
  exists. Given that NDIS drivers seem to scan for BARs in ascending
  order, I think this should be ok.

- Fixed the code that tries to process firmware images that have been
  loaded as .ko files. To save a step, I was setting up the address
  mapping in ndis_open_file(), but ndis_map_file() flags pre-existing
  mappings as an error (to avoid duplicate mappings). Changed this so
  that the mapping is now donw in ndis_map_file() as expected.

- Made the typedef for 'driver_entry' explicitly include __stdcall
  to silence gcc warning in ndis_load_driver().

NOTE: the Texas Instruments ACX111 driver needs firmware. With my
card, there were 3 .bin files shipped with the driver. You must
either put these files in /compat/ndis or convert them with
ndiscvt -f and kldload them so the driver can use them. Without
the firmware image, the NIC won't work.
</pre>
</div>
</content>
</entry>
<entry>
<title>Minor cleanups:</title>
<updated>2004-08-03T17:00:39+00:00</updated>
<author>
<name>Bill Paul</name>
<email>wpaul@FreeBSD.org</email>
</author>
<published>2004-08-03T17:00:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=64823e73c5a785ebc47aaaa2def3b381b31df0f0'/>
<id>64823e73c5a785ebc47aaaa2def3b381b31df0f0</id>
<content type='text'>
- Fix typo in comment
- Remember to free() sc-&gt;ndis_txarray on detach
- Remember to do an ifmedia_removeall() for ethernet devices
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Fix typo in comment
- Remember to free() sc-&gt;ndis_txarray on detach
- Remember to do an ifmedia_removeall() for ethernet devices
</pre>
</div>
</content>
</entry>
<entry>
<title>Second part of ALTQ driver modifications, covering:</title>
<updated>2004-08-01T23:58:04+00:00</updated>
<author>
<name>Max Laier</name>
<email>mlaier@FreeBSD.org</email>
</author>
<published>2004-08-01T23:58:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=154b8df2ed89bc6ff54310ee54cd720670405ba7'/>
<id>154b8df2ed89bc6ff54310ee54cd720670405ba7</id>
<content type='text'>
	an(4), ath(4), hme(4), ndis(4), vr(4) and wi(4)

Please help testing: http://people.freebsd.org/~mlaier/ALTQ_driver/

Tested by:	Vaidas Damosevicius (an, ath, wi)
		Roman Divacky (vr)
Submitted by:	yongari (hme)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
	an(4), ath(4), hme(4), ndis(4), vr(4) and wi(4)

Please help testing: http://people.freebsd.org/~mlaier/ALTQ_driver/

Tested by:	Vaidas Damosevicius (an, ath, wi)
		Roman Divacky (vr)
Submitted by:	yongari (hme)
</pre>
</div>
</content>
</entry>
<entry>
<title>The watchdog callout executes with the (non-sleepable) ifnet lock held</title>
<updated>2004-08-01T22:25:12+00:00</updated>
<author>
<name>Bill Paul</name>
<email>wpaul@FreeBSD.org</email>
</author>
<published>2004-08-01T22:25:12+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8ea534a9c097c23094c146a5289053d7be76ebc9'/>
<id>8ea534a9c097c23094c146a5289053d7be76ebc9</id>
<content type='text'>
now, but it's possible for ndis_reset_nic() to sleep (sometimes the
MiniportReset() method returns NDIS_STATUS_PENDING and we have
to wait for completion). To get around this, execute the ndis_reset_nic()
routine in the NDIS_TASKQUEUE thread.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
now, but it's possible for ndis_reset_nic() to sleep (sometimes the
MiniportReset() method returns NDIS_STATUS_PENDING and we have
to wait for completion). To get around this, execute the ndis_reset_nic()
routine in the NDIS_TASKQUEUE thread.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add some minor changes related to PCMCIA attribute memory mapping</title>
<updated>2004-08-01T06:42:44+00:00</updated>
<author>
<name>Bill Paul</name>
<email>wpaul@FreeBSD.org</email>
</author>
<published>2004-08-01T06:42:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=dde913e3ca953e8d37e3a324dba16db6ad1b8c1a'/>
<id>dde913e3ca953e8d37e3a324dba16db6ad1b8c1a</id>
<content type='text'>
(which I apparently forgot to commit earlier).

Acquire NDIS_LOCK() in ndis_linksts_done().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(which I apparently forgot to commit earlier).

Acquire NDIS_LOCK() in ndis_linksts_done().
</pre>
</div>
</content>
</entry>
<entry>
<title>Make NdisReadPcmciaAttributeMemory() and NdisWritePcmciaAttributeMemory()</title>
<updated>2004-07-11T00:19:30+00:00</updated>
<author>
<name>Bill Paul</name>
<email>wpaul@FreeBSD.org</email>
</author>
<published>2004-07-11T00:19:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7602de354fee3a5f1d2c69dfef205930b271a087'/>
<id>7602de354fee3a5f1d2c69dfef205930b271a087</id>
<content type='text'>
actually work.

Make the PCI and PCCARD attachments provide a bus_get_resource_list()
method so that resource listing for PCCARD works. PCCARD does not
have a bus_get_resource_list() method (yet), so I faked up the
resource list management in if_ndis_pccard.c, and added
bus_get_resource_list() methods to both if_ndis_pccard.c and if_ndis_pci.c.
The one in the PCI attechment just hands off to the PCI bus code.
The difference is transparent to the NDIS resource handler code.

Fixed ndis_open_file() so that opening files which live on NFS
filesystems work: pass an actual ucred structure to VOP_GETATTR()
(NFS explodes if the ucred structure is NOCRED).

Make NdisMMapIoSpace() handle mapping of PCMCIA attribute memory
resources correctly.

Turn subr_ndis.c:my_strcasecmp() into ndis_strcasecmp() and export
it so that if_ndis_pccard.c can use it, and junk the other copy
of my_strcasecmp() from if_ndis_pccard.c.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
actually work.

Make the PCI and PCCARD attachments provide a bus_get_resource_list()
method so that resource listing for PCCARD works. PCCARD does not
have a bus_get_resource_list() method (yet), so I faked up the
resource list management in if_ndis_pccard.c, and added
bus_get_resource_list() methods to both if_ndis_pccard.c and if_ndis_pci.c.
The one in the PCI attechment just hands off to the PCI bus code.
The difference is transparent to the NDIS resource handler code.

Fixed ndis_open_file() so that opening files which live on NFS
filesystems work: pass an actual ucred structure to VOP_GETATTR()
(NFS explodes if the ucred structure is NOCRED).

Make NdisMMapIoSpace() handle mapping of PCMCIA attribute memory
resources correctly.

Turn subr_ndis.c:my_strcasecmp() into ndis_strcasecmp() and export
it so that if_ndis_pccard.c can use it, and junk the other copy
of my_strcasecmp() from if_ndis_pccard.c.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix two problems:</title>
<updated>2004-07-07T17:46:30+00:00</updated>
<author>
<name>Bill Paul</name>
<email>wpaul@FreeBSD.org</email>
</author>
<published>2004-07-07T17:46:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=06794990cb8cab6d8e3ed431d6383404138224a6'/>
<id>06794990cb8cab6d8e3ed431d6383404138224a6</id>
<content type='text'>
- 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-&gt;if_ioctl() called with SIOCSIFADDR (which we don't handle)
	- ifp-&gt;if_ioctl() called with SIOCADDMULTI
	- ifp-&gt;if_ioctl() called with SIOCADDMULTI (again)
	- ifp-&gt;if_ioctl() called with SIOCADDMULTI (yet again)
	- ifp-&gt;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-&gt;if_init(). However, we don't call ifp-&gt;if_init() until
  ifp-&gt;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-&gt;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-&gt;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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- 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-&gt;if_ioctl() called with SIOCSIFADDR (which we don't handle)
	- ifp-&gt;if_ioctl() called with SIOCADDMULTI
	- ifp-&gt;if_ioctl() called with SIOCADDMULTI (again)
	- ifp-&gt;if_ioctl() called with SIOCADDMULTI (yet again)
	- ifp-&gt;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-&gt;if_init(). However, we don't call ifp-&gt;if_init() until
  ifp-&gt;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-&gt;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-&gt;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.
</pre>
</div>
</content>
</entry>
</feed>
