Commit Graph

13824 Commits

Author SHA1 Message Date
Warner Losh
829681b6aa Remove obsolete include 2005-09-23 21:59:11 +00:00
Warner Losh
b7a9396a75 Forgot to commit ata-card fixes last night. Fix gleb's attempt to do
the right thing by merging in the changes I neglected to commit last
night.
2005-09-22 18:46:29 +00:00
Gleb Smirnoff
e21d20fc4c Fix build. 2005-09-22 18:41:56 +00:00
Warner Losh
6242d774d9 Remove compat layer for OLDCARD compatibility. All instances of it
are now gone from the tree.
2005-09-22 14:51:11 +00:00
Warner Losh
c82f53f61d 'PC Card' instead of other variants 2005-09-22 06:01:44 +00:00
Warner Losh
ca7ea03837 Eliminate dead code 2005-09-22 05:56:32 +00:00
Warner Losh
a1f72203b1 PC Card instead of other variants 2005-09-22 05:52:54 +00:00
Warner Losh
0ed03bc788 MFp4: save mac addr hint, eliminage OLDCARD shims 2005-09-22 05:11:50 +00:00
Justin T. Gibbs
ad3d2a4dc5 Use the AHC_DISABLE_PCI_PERR flag to silence parity error reporting on
chips where setting the FAILDIS bit is not effective.  While here,
try again to make it clear that reported parity errors indicate
a failure of some PCI device *other than* the aic7xxx controller.
2005-09-22 05:11:35 +00:00
Warner Losh
a6869ccad0 Remove OLDCARD shims 2005-09-22 05:06:37 +00:00
Justin T. Gibbs
23a6493baf Enhance diagnostic printfs for the chains of free lists used to
avoid SCB ID collissions to non-packetized targets.
2005-09-22 05:06:03 +00:00
Justin T. Gibbs
16346ae5f5 Correct bug that caused the completed "recovery" scb to have its
timer reset rather than the timer of an SCB still pending on the
controller after recovery completed.  This should correct timeout
loops seen in the field.
2005-09-22 05:01:37 +00:00
Justin T. Gibbs
6bdc5bdf68 Set allow_memio to 1 if fetching the allow_memio hint fails. This
is the default behavior according the the bootverbose printf in the
failure case.
2005-09-22 04:56:59 +00:00
Warner Losh
09ec45fd15 MFp4: Remove OLDCARD shims 2005-09-22 04:51:11 +00:00
Warner Losh
b1d1a29cf6 MFp4: trivial KNF nits 2005-09-22 04:49:17 +00:00
Warner Losh
2a5481cafd MFp4: KNF (mostly remove K&R function definitions). Fix some spaces left
over from de__Ping.

# Didn't fix the -Exxxx return statements that appaer to be linuxisms
# (and wrong) since I don't have hardware to test with.
2005-09-22 04:46:56 +00:00
Warner Losh
44dbf79b0c Better descriptions for the Jack of Diamonds cards. 2005-09-21 23:57:26 +00:00
Warner Losh
7132e1b9ae Remove OLDCARD shims 2005-09-21 22:45:14 +00:00
Warner Losh
209161a4f6 Don't confuse the tuple code and the tuple length. Ooops. Since most
CIS are tiny, this likely hasn't bit anybody yet...
2005-09-21 20:08:24 +00:00
Warner Losh
50757d2fce Split power state control into two variables. hw.pci.do_powerstate
has been removed.  It has been replaced by hw.pci.do_power_nodriver
and hw.pci.do_power_resume.  The former defaults to 0 while the latter
defaults to 1.

When do_powerstate was set to 0, it broke suspend/resume for a lot of
people as an unintended consequence.  This change will only affect the
areas that were intended to affect.  This change will have no effect on
servers, but will help laptops quite a bit.

MFC After: 3 days.
2005-09-21 19:47:00 +00:00
Marcel Moolenaar
3cf09dd123 Fix an unaligned I/O memory access in the event that a SCB times out.
The FXP_SCR_FLOWCONTROL registers is at offset 0x19, but 2 bytes wide.
It cannot be read as a word without causing a panic on architectures
that enforce strict alignment.

MFC after: 3 days
2005-09-21 04:36:40 +00:00
Warner Losh
3896edc1d9 Use the correct minor number for the pccardX.cis device.
Don't destroy a NULL device.

This should fix the panics on boot people are seeing on systems with
more than one pccard slot.
2005-09-20 23:48:06 +00:00
Warner Losh
d39ab32b08 Remove OLDCARD support by removing compat shims 2005-09-20 19:54:11 +00:00
Warner Losh
973af40a84 Better use of gone. 2005-09-20 19:50:27 +00:00
Warner Losh
7a5b855af3 Remove oldcard support by removing the compat shims. 2005-09-20 19:49:33 +00:00
Warner Losh
b152e6d1fc Remove support for oldcard by removing compat shims. 2005-09-20 19:46:54 +00:00
Warner Losh
479f7d5fe8 Eliminate support for oldcard by removing the compat shims. 2005-09-20 19:45:08 +00:00
Warner Losh
255e4915dc remove some dead code 2005-09-20 19:34:10 +00:00
Gleb Smirnoff
c33f26f32b Remove queue check from last commit. In most cases there is smth in queue,
when start function is called.

Reviewed by:	ru
2005-09-20 14:52:57 +00:00
Gleb Smirnoff
aecb98c94d Check IFF_DRV_RUNNING and presense of packets in queue before calling
em_start_locked(). This fixes panic on shutdown with active traffic
passing through router.

Sponsored by:	Rambler
2005-09-20 13:37:17 +00:00
Gleb Smirnoff
90951c859b Fix build. 2005-09-20 10:25:51 +00:00
Warner Losh
73cac3387f Implement /dev/pccardN.cis. This mirrors the CIS for the card to userland.
pccardc dumpcis /dev/pccardN.cis will work now, but I may rewrite pccardc.

Also, move more of the private data to a new file called pccardvarp.h.
2005-09-20 06:47:33 +00:00
Warner Losh
88750dc361 Call the passed function on cis scanning for all nodes in the CIS
chains, not just the 'real' ones.
2005-09-20 06:45:38 +00:00
Andre Oppermann
1761656cdd Replace m_extadd() with macro version MEXTADD(). 2005-09-19 22:04:41 +00:00
Andre Oppermann
0ec75b9be9 Replace custom mbuf writeability test with generic
M_WRITEABLE() test covering all edge cases too.
2005-09-19 21:59:49 +00:00
Damien Bergamini
28a380736d Use phk's kernel unit number allocator to associate unique ids to neighbors
in an IBSS.  Store ids directly into ieee80211_node's instead of managing
our own private association table.  Idea and code by Sam Leffler.

Submitted by:	sam
MFC after:	5 days
2005-09-19 18:59:04 +00:00
Damien Bergamini
e26a9b9fff The "SMC EZ Connect SMC2862W-G" product is not based on the Ralink RT2500USB
chipset.

MFC after:	5 days
2005-09-19 18:19:22 +00:00
Damien Bergamini
7e47fb024c It's safe to wait for command completion in iwi_config().
MFC after:	5 days
2005-09-19 16:26:52 +00:00
Warner Losh
bb041987d9 Remove duplicate if_free().
Submitted by:	ru@
2005-09-19 14:44:11 +00:00
Ruslan Ermilov
6ed0b39d28 Restore the ability to detach from a tty via SIOCSTTY and document
recent changes in a manpage.

Reviewed by:	cognet
2005-09-19 13:48:45 +00:00
Søren Schmidt
3d42c6d13a Dont wait for READY on ATAPI_IDENTIFY.
Fixes the losage of some ATAPI device that reported failed probing with
"timeout waiting for read DRQ".
2005-09-19 07:35:42 +00:00
Poul-Henning Kamp
9b00ca1961 Fix configuration locking in MD.
Remove  md_mtx.

Remove GIANT from the mdctl device driver and avoid DROP_GIANT,
PICKUP_GIANT and geom events since we can call into GEOM directly
now.

Pick up Giant around vn_close().

Apply an exclusive sx around mdctls ioctl and preloading to protect
lists etc..

Don't initialize our lock (md_mtx or md_sx) from a
SYSINIT when there is a perfectly good pair of _fini/_init
functions to do it from.

Prune any final fractional sector from the mediasize to
keep GEOM happy.

Cleanups:

Unify MDIOVERSION check in (x)mdctlioctl()

Add pointer to start() routine to softc to eliminate a switch{}

Inline guts of mddetach().

Always pass error pointer to mdnew(), simplify implementation.
2005-09-19 06:55:27 +00:00
Warner Losh
93605bb138 Last change to this file actually removed the oldcard compat code.
This change removes one last K&Rism.
2005-09-19 03:35:32 +00:00
Warner Losh
ad4f426ef6 Make sure that we call if_free(ifp) after bus_teardown_intr. Since we
could get an interrupt after we free the ifp, and the interrupt
handler depended on the ifp being still alive, this could, in theory,
cause a crash.  Eliminate this possibility by moving the if_free to
after the bus_teardown_intr() call.
2005-09-19 03:10:21 +00:00
Warner Losh
62e428c42e MFp4:
o eliminate the ED_NO_MIIBUS option.  Now, you need miibus to use ed with
  pccard.  If you have an old ISA or PCI card w/o a miibus, then you'll still
  be able to use the ed driver w/o miibus in the kernel.  If you have pccard
  you'll need mii now.  Most pccards these days have miibus, and many
  cards have ISSUES if you don't attach miibus.  issues I don't want to
  constantly rediagnose.
  - Add new media_ioctl, mediachg and tick function pointers.  The core
    driver will call these if they aren't NULL, or return an error if they
    are.
  - migrate remaining mii code into if_ed_pccard.
o include some notes from my datasheet fishing.  this may allow us to
  get media status from some pccards.
o Fix one bug that's common to many drivers.  call if_free(ifp) after
  we tear down the interrupt.  ed_intr() depends on ifp being there and
  freeing it while interrupts can still happen is, ummm, bad.
2005-09-18 20:51:34 +00:00
Olivier Houchard
30ce1aad9c Slightly change the API for the SNPSTTY ioctl so that the userland now
provides a file descriptor instead of a dev_t.

Discussed with:	phk
MFC after: 3 days
2005-09-18 19:23:35 +00:00
Alexander Leidinger
edffb4c891 Add the KLD to the sndstat info. 2005-09-18 15:38:40 +00:00
Alexander Leidinger
c61957b5fb Merge NetBSD fixes (except for 1.97 there should be no functional change):
1.94: ansify and KNF (NetBSD KNF).
	1.95: Fix DPRINTF (bug from change in 1.94).
	1.96: NetBSD specific.
	1.97: Fix memory leak reported by Ted Unangst as bug #3 on tech-kern.

Obtained from:	NetBSD
2005-09-18 15:13:06 +00:00
Marius Strobl
1f317bf968 - In gem_ioctl() move the call to ether_ioctl() to the default case of
the switch statement in order to make this driver more like other
  Ethernet NIC drivers.
- In gem_attach() call gem_stop() in addition to gem_reset() to make
  sure the chip actually is stopped and not just reset.
- In gem_stop() also stop the gem_rint_timeout() callout in case the
  driver is compiled with GEM_RINT_TIMEOUT defined.

Merge some locking improvements from hme(4):
- Use callout_init_mtx() to close races between gem_stop() and gem_tick()
  as weel as gem_stop() and gem_rint() in case the driver is compiled
  with GEM_RINT_TIMEOUT defined.
- Use the driver lock instead of Giant in a bus dma callback.
- Lock the driver lock around mii operations.
- Cleanup locking in gem_ioctl().
- Remove redundant assertions that the driver lock is not held in
  gem_attach() and gem_detach() since mtx_lock() will assert that
  already since the driver lock is not recursive.
- Add callout_drain()'s to gem_detach() after calling gem_stop() to make
  sure that if softclock is running on another CPU and is blocked on our
  driver lock, we will wait until it has acquired the lock, seen that it
  was cancelled, dropped the lock, and awakened us so that we can safely
  destroy the mutex.
2005-09-18 13:23:19 +00:00
Alexander Leidinger
d4c4f2c099 ehcivar.h:
Synchronise with NetBSD upto rev 1.19:
		- Allow 32 chars in the saved vendor string.
		- Some NetBSD-only changes.
		- Some missing parts (define, variable).

ehci_pci.c:
	Add vendor ids for ATI and Philips.

	Add identification strings for the following:
		o ALi's M5239
		o AMD 8111
		o ATI SB200, SB400
		o Intel 6300ESB, ICH4, ICH5, ICH7
		o NVIDIA nForce 2, nForce 3, nForce 4
		o Philips ISP156x

ehcireg.h:
	We're at the same level as rev 1.18 from NetBSD.

usb_port.h:
	NetBSD/OpenBSD specific things

Obtained from:		NetBSD via DragonFly
No comment from:	usb@
2005-09-18 11:45:39 +00:00