Commit Graph

11745 Commits

Author SHA1 Message Date
imp
d35148311b Set fdc_dev in attach 2004-07-13 02:44:40 +00:00
imp
02b4d8a438 Don't depend on implicit include of machine/bus.h in sys/rman.h, but instead
explicitly include it.
2004-07-13 02:42:23 +00:00
imp
bdcd057a4e Remove even more references to generating usbdevs_data.h, et al.
Noticed by: njl
2004-07-12 23:11:09 +00:00
imp
3c84bfe26f Remove the instructions for regenerating usbdevs.h: that's now no
longer necessary.
2004-07-12 22:57:06 +00:00
njl
7c75fe7d97 Remove unnecessary softc bzero calls. 2004-07-12 21:15:36 +00:00
njl
462b2a5e44 Add the ability to detach a battery. Now batteries that are detached are
also removed from the battery list.
2004-07-12 20:53:04 +00:00
njl
7b5fb1c0fe Update in preparation for adding the ACPI attachment.
* Add an fdtype ivar.  This will be the equivalent of fd->type.
* Move enabling the FIFO to the end of attach.
* Unify reset code into fdc_initial_reset().
* Add fdc_write_ivar().
* Update isa and pccard attachments accordingly.
* Set the flags unconditionally in probe since they may be overridden by
  other probe routines.  Both before and now, we're depending on probe
  being called a final time on the winning driver so the flags we get are
  the ones we intended.
* Use the bus accessor macros instead of defining our own.
* Remove duplicate assigns of fd->type.
2004-07-12 20:49:26 +00:00
sos
4997cbe712 Attempt to handle suspend/resume better. 2004-07-12 10:50:50 +00:00
imp
a6214e1123 Until I'm ready to commit the better pccard probe/attach routines, effectively
comment them out.
2004-07-11 16:01:25 +00:00
phk
3683e698d2 Introduce ttygone() which indicates that the hardware is detached.
Move dtrwait logic to the generic TTY level.
2004-07-11 15:18:39 +00:00
wpaul
16416501a9 Make NdisReadPcmciaAttributeMemory() and NdisWritePcmciaAttributeMemory()
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.
2004-07-11 00:19:30 +00:00
marcel
6660e9e4c0 Update for the KDB framework. Sanitize the alpha console code now that
it's in the way even more. Basicly: remove all alpha specific console
support from gfb(4), sio(4) and syscons(4). Rewrite the alpha console
initialization to be identical to all other platforms. In a nutshell:
call cninit().
The platform specific code now only sets or clears RB_SERIAL and thus
automaticly causes the right console to be selected.

sio.c:
o  Replace the remote GDB hacks and use the GDB debug port interface
   instead.
o  Make debugging code conditional upon KDB instead of DDB.
o  Call kdb_alt_break() instead of db_alt_break().
o  Call kdb_enter() instead of breakpoint().
o  Remove the ugly compatibility of using the console as the debug
   port.
2004-07-10 22:29:41 +00:00
marcel
0d98473ef9 Update for the KDB framework:
o  Call kdb_enter() instead of Debugger().
2004-07-10 21:21:13 +00:00
marcel
2f2074cbd9 Update for the KDB framework:
o  Make debugging code conditional upon KDB instead of DDB.
o  Call kdb_alt_break() insteadof db_alt_break().
2004-07-10 21:18:33 +00:00
marcel
3351894f4f Update for the KDB framework:
o  Call kdb_enter() instead of breakpoint().
o  Call kdb_alt_break() instead of db_alt_break().
o  Make debugging code conditional upon KDB instead of DDB.
2004-07-10 21:16:01 +00:00
marcel
f2187020e1 Update for the KDB framework:
o  Make debugging code conditional upon KDB instead of DDB.
2004-07-10 21:14:20 +00:00
marcel
153c72172f Remove DDB. The one user of this macro has been changed to use BVDDB.
Yes, DDB is unrelated to the debugger with the same acronym. Hence,
the change.
2004-07-10 21:13:28 +00:00
marcel
d6d823aef5 s/DDB/BVDDB/g
Note that DDB is unrelated to the debugger with the same acronym.
2004-07-10 21:12:27 +00:00
marcel
d6d709552d Update for the KDB framework:
o  Make debugging code conditional upon KDB instead of DDB.
o  Call kdb_alt_break() instead of db_alt_break().
2004-07-10 21:09:47 +00:00
marcel
069f39a671 Update for the KDB framework:
o  Make debugging code conditional upon KDB instead of DDB.
o  Call kdb_alt_break() instead of db_alt_break().
o  Call kdb_enter() instead of breakpoint().
2004-07-10 21:07:44 +00:00
marcel
5aaccdba8a Update for the KDB framework:
o  Make debugging code conditional upon KDB instead of DDB.
2004-07-10 21:06:08 +00:00
marcel
4aa6ec6ad9 Update for the KDB framework:
o  Make debugging code dependent upon KDB instead of DDB.
2004-07-10 21:05:14 +00:00
marcel
f95797fb06 Update for the KDB framework:
o  Call kdb_enter() instead of Debugger().
o  Don't make such calls conditional upon KDB instead of DDB because
   they're already conditional upon EN_DEBUG.
2004-07-10 21:03:52 +00:00
marcel
2a624cf907 Update for the KDB framework:
o  Use kdb_alt_break() to handle the alternate break sequence instead
   of handcoding it here.
o  Remove GDB kluges to make this driver work with the pre-KDB remote
   GDB code.
o  Call kdb_enter() instead of Debugger().

Note that with this commit the dcons(4) driver cannot be used for
remote debugging anymore. This driver has to use the new GDB debug
port interface instead. Such has not been done yet.
2004-07-10 21:02:17 +00:00
marcel
5871b498c8 Update for the KDB framework:
o  Remove inclusion of opt_ddb.h
o  Make debugging code conditional upon KDB.
2004-07-10 20:57:43 +00:00
marcel
f4488175f3 Update for the KDB framework:
o  Call kdb_enter() instead of Debugger().
2004-07-10 20:56:43 +00:00
marcel
81854db17f Add support for uart(4) being a debug port for the GDB backend. 2004-07-10 18:08:38 +00:00
phk
afe21b6175 Remove a pointless check. 2004-07-10 15:38:27 +00:00
marius
8526267db8 - Add missing <sys/module.h>. [1]
- Remove unused includes.
- Sort includes.

Reported by:	Pyun YongHyeon <yongari@kt-is.co.kr> [1]
2004-07-09 23:12:22 +00:00
cognet
113a0eae5d Do not bzero() the softc, as newbus does it for us. 2004-07-09 16:56:46 +00:00
cognet
10b0f934b6 Newbus returns a zeroed softc, so there's no need to call bzero() here. 2004-07-09 13:42:05 +00:00
bms
e828b3b382 Apply the long-overdue hatchet of style(9) death to this file. 2004-07-09 02:19:07 +00:00
bms
3600006e8c Further locking improvements for vr(4):
- Add *_locked() entry points as needed to avoid unnecessary lock thrashing.
 - Use these entry points wisely.
 - Only acquire the lock once when servicing an interrupt.
 - Check 'suspended' on interrupt to avoid racing detach.
 - Correct a mis-spelled comment.
 - Don't take the lock in vr_reset() to avoid lock thrashing in attach.
  - Comment this.

Reviewed by:	-net (silence)
2004-07-09 00:17:14 +00:00
bms
8336c29bfb Add a 'suspended' flag to softc so that we can avoid races on detach. 2004-07-09 00:12:41 +00:00
imp
78dfca3951 Break out the isa and pccard front ends from fdc. This is the first
step in making this driver more attachment neutral.  Others plan on
adding acpi front ends.

Still need to cleanup the MI part of the driver because it isn't as
bus independent as it could be.
2004-07-07 22:35:27 +00:00
wpaul
966185d797 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
bms
0b885a2c86 Eliminate unneeded return keywords. 2004-07-06 02:48:29 +00:00
bms
a3d7be0a38 Whitespace pass 2004-07-06 02:46:53 +00:00
bms
2cf04d55ce Whitespace nit 2004-07-05 22:52:01 +00:00
bms
2ced1b0135 Eliminate redundant return keywords. 2004-07-05 22:50:52 +00:00
bms
36da28d77c Whitespace pass. 2004-07-05 22:46:28 +00:00
bms
c3a45c579d style(9):
- Space before bracketized non-void function returns.
 - Space before condition for conditional blocks.
2004-07-05 22:42:07 +00:00
bms
31312e4bc9 Eliminate redundant return keywords. 2004-07-05 22:36:48 +00:00
bms
dce22f420f Whitespace nits 2004-07-05 22:35:18 +00:00
bms
e305581b9b style(9) pass on prototypes. 2004-07-05 22:27:26 +00:00
phk
fe7583f88c Allocate the DMA channel shareable and only aquire it while the
device is open.  This allows certain old and rather special dual
floppy controllers to work on both channels, as long as you only
have one open at a time.
2004-07-05 20:56:06 +00:00
phk
d0b755c141 Mark our interrupt shareable and don't insist on DMA. This gets us closer
to working with a secondary floppy controller on a PC.
2004-07-04 23:16:04 +00:00
bms
b9a0ef169c Check the return value of bus_dmamem_alloc() correctly.
Submitted by:	Darron Broad (with cleanups)
2004-07-04 18:40:36 +00:00
phk
e58c00e142 Add modemcontrol support for DTR and DCD.
Tested by:	ambrisko
2004-07-04 16:27:58 +00:00
imp
631556e5b2 Make the default memory range in the top 2GB of ram in the hopes that
this more accurately reflects what the underlying hardware of most
acpi machines that don't have children pci busses.

We still need a better way to get this information from acpi/hardware.
2004-07-04 16:23:25 +00:00