Commit Graph

11811 Commits

Author SHA1 Message Date
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
stefanf
9dea8aeba1 Consistently use __inline instead of __inline__ as the former is an empty macro
in <sys/cdefs.h> for compilers without support for inline.
2004-07-04 16:11:03 +00:00
sanpei
a819334bbc Add device ID for atuwi USB wlan driver, Linksys WUSB11 v2.8 wireless adapter.
(Atmel at76c503a http://vitsch.net/bsd/atuwi)

PR:		kern/68465
Submitted by:	Suihong Liang <s2liang@uwaterloo.ca>
2004-07-04 09:13:53 +00:00
bms
a4215c557a SMPng locking cleanup for vr(4).
- Remove recursive locking situations. Remove the MTX_RECURSE bit.
 - Take the lock for any routine which is not called from within if_vr.c
   itself; this includes entry points called by newbus, ifnet, callout,
   ifmedia, and polling subsystems.
 - Remove spl references from the code added to miibus callbacks in rev 1.60.
 - Add the INTR_MPSAFE bit.
 - Tidy up some assignments; locks are not needed for taking the address
   of something at a known offset, for example.
 - Tested on the machine this was committed from.

Tested on:	UP only, !debug.mpsafenet && debug.mpsafenet
Reviewed by:	rwatson
2004-07-03 02:59:02 +00:00
bms
507c96c429 - Another whitespace pass; make locking calls more obvious.
- Use C99 types for vr_miibus_readreg().
2004-07-03 02:52:32 +00:00
marcel
4c8ddc3ef6 Unbreak -O2 build: initialize nstatus to avoid uninitialized warning. 2004-07-03 02:10:52 +00:00
bms
47f5e31e2b style(9) compliance.
Put some braces around the busy-wait loop in vr_rxeoc() to make the
no-op semicolon more obvious.
No functional changes.
Running on the machine I am committing from without problems.

Reviewed by:	jmallett
2004-07-02 23:51:44 +00:00
njl
1f506bc6fa Remove duplicate FreeBSD id. 2004-07-02 20:15:53 +00:00
njl
f3e20d3d7b Get rid of the strict aliasing error by retrieving the ECDT via a table
header pointer and then casting it to the ecdt pointer.  This fixes the
-O2 build.  I'm unsure what changed recently to reveal this error since
this code has been unchanged for months.
2004-07-02 19:17:27 +00:00
netchild
14b36b7b44 Implement SNDCTL_DSP_SETDUPLEX. This may fix sound apps which want to
use full duplex mode.

Approved by:	matk
2004-07-02 15:31:44 +00:00
imp
d4df3eec34 Disable native ata support for now, too much breaks 2004-07-02 13:42:36 +00:00
mlaier
7bc770a254 Bring in the first chunk of altq driver modifications. This covers the
following drivers: bfe(4), em(4), fxp(4), lnc(4), tun(4), de(4) rl(4),
sis(4) and xl(4)

More patches are pending on: http://peoples.freebsd.org/~mlaier/ Please take
a look and tell me if "your" driver is missing, so I can fix this.

Tested-by:	many
No-objection:	-current, -net
2004-07-02 12:16:02 +00:00
jhb
38f4fdd957 Add support for the VIA Apollo KT400/400A/600 AGP host bridges which use
the VIA v3 register offsets.

PR:		68545
Submitted by:	Ariff Abdullah <skywizard@mybsd.org.my>
2004-07-02 03:39:33 +00:00
tackerman
266fbe3791 PR kern/68474:
Changed if_ipending to if_flags
2004-07-01 22:37:47 +00:00
le
1a49f27fe6 MFNetBSD.
rev 1.66, author: mycroft
   Fix an endianness problem (EHCI_NULL was being double-swapped).

Obtained from:  NetBSD
2004-07-01 21:17:50 +00:00
le
4925f692a6 MFNetBSD.
rev. 1.68, author: mycroft
   Ignore a port error that happens to come in at the same time as a
   connect status change.  Some root hubs seem to report both.

Obtained from:   NetBSD
2004-07-01 21:14:03 +00:00
imp
9665453a33 Remove duplicate FreeBSD id 2004-07-01 17:23:49 +00:00
imp
1548fadf09 While this file still needs __RMAN_RESOURCE_VISIBLE to get the size of
the struct resource for a malloc, it no longer needs it for the r_
elements of struct resource with this commit.
2004-07-01 17:23:11 +00:00
imp
35a5a36dea After re-exporting rman, et al, __RMAN_RESOURCE_VISIBLE is no longer
necessary for this file.  It just needed the size and guts of struct
rman.
2004-07-01 17:21:18 +00:00
brooks
cbf83ad662 Add support to the uftdi driver for Intrepid Control Systems' vehicle
bus interfaces.  These interfaces use the FTDI chipset with different
Vendor and Product IDs.

Add two additional baud rate enumerations.  The vehicle bus interfaces
use a baud rate of 2000000.  Also add 3000000 as it is the other FTDI
baud divisor special case.

I've commited a slightly different patch from that provided in the PR as
I changed the matching code a bit yesterday.

Submitted by:	Mike Durian <durian at shadetreesoftware.com>
PR:		kern/67357
2004-07-01 17:16:20 +00:00
mp
061907e201 Fix build: the return type for t_break changed from int to void. 2004-07-01 15:19:08 +00:00
jhb
900e7c295d Trim a few things from the dmesg output and stick them under bootverbose to
cut down on the clutter including PCI interrupt routing, MTRR, pcibios,
etc.

Discussed with:	USENIX Cabal
2004-07-01 07:46:29 +00:00
ps
1b4f57448e Use a separate flag when doing a kernel coredump when polling for
completion instead of abusing the interrupt enable flag.
2004-07-01 06:56:10 +00:00
brooks
18cd3a96f1 Product and vendor ids for SIIG US2308 USB to Serial adaptor.
Tested against:	rwatson's laptop
2004-07-01 05:14:12 +00:00
green
8bb6b62186 It's not very useful to set a softc refcount around blocking read/write
operations when the refcount doesn't protect the opens and closes.  Fix
this, and don't actually let a time out happen: now ugen(4) devices do
not get freed out from under the programs with them open.
2004-07-01 02:07:01 +00:00
njl
b5f51b6b04 Rework the code that waits for a response from the EC. Use an sx lock
instead of a mutex so we do not unblock it in msleep().  If we do this,
another event could occur, resetting the status register since reads
reset it.  While I'm here, remove the backoff approach.  Instead, sleep
in 10 ms chunks for up to the configured timeout using either DELAY (if
we aren't booted yet) or tsleep.

Help from:	dillon
Tested by:	Andrew Thompson andy AT fud.org.nz
2004-07-01 00:51:31 +00:00
phk
309dbc34d2 Define the tty methods as typedefs.
Change the return type for t_break to void.

Add t_ioctl (more about this later).
2004-06-30 21:38:08 +00:00
imp
e23137428c Remove extra RMAN_RESOURCE_VISISBLE 2004-06-30 21:37:55 +00:00
imp
c74757e280 puc needs to peek into struct resource too. 2004-06-30 21:27:59 +00:00
phk
aaba1b361d This needs __RMAN_RESOURCE_VISIBLE 2004-06-30 21:24:19 +00:00
njl
d87b94c8e4 Add missing function debug trace macros to the new powerres functions.
Reported by:	phk
2004-06-30 20:31:13 +00:00
imp
9f2638da1f Hide struct resource and struct rman. You must define
__RMAN_RESOURCE_VISIBLE to see inside these now.

Reviewed by: dfr, njl (not njr)
2004-06-30 16:54:10 +00:00
njl
5fc49780bf Move flags into a private ivar so it can't collide with device flags.
Unify the code to disable GPEs with the enable code.  Shutdown is handled
the same way.  ACPI now does all wake/sleep prep for child devices so
now they no longer need to call external functions in the suspend/resume
path.  Add the flags to non-ACPI busses (i.e., pci).
2004-06-30 16:08:03 +00:00
njl
d42a9ac2bf Add a method for referencing/switching power resources based on _PRW.
This brings us into line with the standard, which requires power resources
be enabled when wake is enabled for a given device.  Move the dereferencing
code into its own function, +acpi_pwr_dereference_resource().
2004-06-30 16:02:40 +00:00
njl
cfc63ebbf3 Disable the EC GPE in the shutdown path. This is correct but is not known
to fix any bug.
2004-06-30 16:00:20 +00:00
njl
0d2007fe4f Diff reduction for style. 2004-06-30 15:10:02 +00:00
sos
a600480444 Remove leftover debug output. 2004-06-30 09:22:47 +00:00
njl
22c21aa533 Add new quirk code that disables problem BIOS versions. Remove old quirk
code that was never really used.  Print a message when disabling ACPI via
a quirk.  Allow the user to override the blacklist decision by setting
hint.acpi.0.disabled="0".  Add missing AcpiTerminate() calls; they are
needed to clean up if bailing out after AcpiInitializeSubsystem().
2004-06-30 04:49:54 +00:00
njl
e452f1561c Add the table quirk matching code. It matches rules defined in acpi_quirks
and sets the flags.  It also calls the machdep quirk code first.  This
allows table quirks (or whitelists) to override machdep quirks.
2004-06-30 04:45:32 +00:00
njl
53a70792e9 Add machdep quirks functions. On i386, this disables acpi on systems with
BIOS dates earlier than Jan 1, 1999.  Add prototypes and quirks flags.
2004-06-30 04:42:29 +00:00
imp
30c1715cd9 Add pnpinfo and location information to uhub. We also keep track of
the subdevices of uhub better now to accomplish this.

Submitted by: Bernd Walter
2004-06-30 02:56:24 +00:00
imp
c9bcce22e7 Remove saved_* from dc_softc. They are now no longer needed.
Submitted by: Marius Strobl
2004-06-29 20:38:44 +00:00
sos
0cf7e93085 Update the special handling code for ATA devices to allow usage of
PCI native addressing. That means that if the HW says that using "real"
addresses instead of the hardwired legacy compat ones is allowed, we will
use them.
2004-06-29 20:25:43 +00:00
njl
338dc29a06 Update for acpi_id_probe() 2004-06-29 19:05:20 +00:00
njl
df407d3803 Staticize acpi_MatchHid() and include acpi_if.h 2004-06-29 19:03:50 +00:00
njl
72ad681e84 Use the acpi_id_probe() method instead of acpi_MatchHid(), which is now
static.
2004-06-29 19:02:27 +00:00
njl
2a43f50bb0 Add implementation of the ACPI methods which hands them off to ACPI-CA.
acpi_id_probe() returns NULL for no match or the ID string that matched
if the driver should attach.
2004-06-29 19:00:36 +00:00
njl
116b6466b4 Add acpi methods for HID/CID probing, evaluating objects, and walking the
namespace.  This is to allow decoupling of attachments from ACPI where they
need some functionality when ACPI is present but do not want to require ACPI
to always be loaded.
2004-06-29 18:56:14 +00:00
njl
7bd198c390 Use a default of the FADT for matching CreatorId quirks. Use XSDT to mean
"match either RSDT or XSDT."
2004-06-29 14:32:06 +00:00
njl
348466ddef Include isa/pnpvar.h and remove a duplicate copy of PNP_EISAID. 2004-06-29 01:33:35 +00:00
njl
bd2a2aff39 While booting, use DELAY() for waiting for the EC to respond instead of
msleep().  Until we're finally up, msleep is a no-op.

Explained by:	peter
2004-06-28 20:41:30 +00:00
imp
61364cc869 Remove the setting of the pci config variables on power state changes.
The bus does this now.
2004-06-28 20:26:21 +00:00
imp
dc0d070947 Remove code to slam the config space on transition to d0. 2004-06-28 20:09:02 +00:00
imp
d622075765 Remove burn bridges code that saved/restored the pci config registers
that are now handled in the pci bus layer.  They are no longer
necessary.
2004-06-28 20:07:03 +00:00
imp
6ad82cc93e another format nit 2004-06-28 16:38:53 +00:00
imp
349ab2cd0a casting for printf happiness 2004-06-28 16:30:49 +00:00
jhb
050c6affec - Shorten the names for the TTY related swi interrupt handlers as the
'tty:' prefix is largely redundant.
- Fix the priority of the low-priority TTY SWIs that are hung off of the
  softclock thread.

Submitted by:	bde (2)
2004-06-28 16:17:11 +00:00
imp
c0e6c73704 rman_reserve_resource doesn't set the bushandle, so we have to do it here.
Badness noted by: njl
Perforce reply not read by: imp
2004-06-28 03:36:37 +00:00
alex
91b307bf77 - Fix style bug in Dell Bluetooth adapter (don't repeat Vendor in
device listing).
- Add generic "Port Replicator" entry for the USB Hubs used in
  Dell port replicators.
2004-06-27 17:27:04 +00:00
imp
84a20ef14e Now that all the in-tree referrences to these old files are gone, go
ahead and remove them.
2004-06-27 16:59:15 +00:00
imp
9739f5e620 MFp4:
Add Intel Pro100Lan56 card.

Also integrate changes from Carlos Velasco.  Only attch if we're a
network device (to filter out the serial devices).  Also, increment
vpmatch if we match to conform to the pccard match function api.
2004-06-27 13:25:28 +00:00
imp
00b6a4b2ac MFp4:
Use bus space rather than direct inb/outb.  Minor style changes while
I'm here.  Extremely preliminary support for siliconix ethernet cards
(but more work is required).
2004-06-27 13:10:20 +00:00
imp
22c7deda99 MFp4:
The hack for setting the bus has been moved down into the cbb driver.
I've been running without this hack in my tree for so long I had
forgotten that I'd removed it :-).  Please let me know if this causes
difficulty for your laptop.
2004-06-27 13:07:02 +00:00
imp
e76d542a9a MFp4: Set the bus handle to the bus handle of the resource, not the
starting value.  This is more pedantically correct (since the handle
isn't always identical to the start of the resource) and also doesn't
access the innards of struct resource direct (which I forbid in my
tree).  We need to do this for all resource types, not just ioport.

Reviewed by: njl
2004-06-27 13:04:19 +00:00
imp
f9dd4765eb MFp4: First batch of dev/usb/usbdevs.h -> usbdevs.h changes. 2004-06-27 12:41:44 +00:00
phk
518c2672d8 Guard against us having no tty pointer. 2004-06-27 11:29:54 +00:00
schweikh
7598f9b9ec Fix a tuner problem.
PR:		kern/66006
Submitted by:	Josh Elsasser <jre@vineyard.net>
MFC after:	1 week
2004-06-27 09:59:02 +00:00
le
35fc8cf52c Catch up with usbd_get_string_desc() change. 2004-06-26 13:21:31 +00:00
le
1537d9035f Our softc has no sc_hdev, but a sc_dev. This in turn has no direct
sc_parent, so back out the previous commit, as it breaks the build.

If there's a pointy hat left, pass it on.
2004-06-26 13:12:46 +00:00
le
1255e60c4d MFNetBSD.
uhid.c (1.61), author: jdolecek
   add support for USB_GET_DEVICEINFO and USB_GET_STRING_DESC ioctls,
   with same meaning as for ugen(4)

usbdi_util.h (1.29), usb_quirks.c (1.50), uhid.c (1.62),
ugen.c (1.68), usb_subr.c (1.114) author: mycroft
   Yes, some devices return incorrect lengths in their string
   descriptors.  Rather than losing, do what Windows does: just
   request the maximum size, and allow a shorter response.  Obsoletes
   the need for UQ_NO_STRINGS, and therefore these "quirks" are removed.

usb_subr.c (1.116), author: mycroft
    In the "seemed like a good idea until I found the fatal flaw"
    department...  Attempting to read a maximum-size string descriptor
    causes my kue device to go completely apeshit.  So, go back to the
    original method, but allow the device to return a shorter string than
    it claimed.

Obtained from:   NetBSD
2004-06-26 10:35:10 +00:00
phk
0567d4ef5f Pick the hotchar out of the tty structure instead of caching private
copies.

No current line disciplines have a dynamically changing hotchar, and
expecting to receive anything sensible during a change in ldisc is
insane so no locking of the hotchar field is necessary.
2004-06-26 09:20:07 +00:00
le
21a36330b4 MFNetBSD.
ohci.c (1.147), author: mycroft
   Failure to properly mask off UE_DIR_IN from the endpoint address
   was causing OHCI_ED_FORMAT_ISO and EHCI_QH_HRECL to get set
   spuriously, causing rather interesting lossage.

   Suddenly I get MUCH better performance with ehci...

ohci.c (1.148), author: mycroft
   Adjust a couple of comments to make it clear WTF is going on.

Obtained from:   NetBSD
2004-06-26 09:19:31 +00:00
le
cd721672a0 MFNetBSD ehci.c and ehcireg.h
ehci.c (1.55), ehcireg.h (1.16); author: mycroft
     Set the data toggle correctly, and use EHCI_QTD_DTC.  This fixes
     problems with my ALi-based drive enclosure (it works now, rather
     than failing to attach).  Also seems to work with a GL811-based
     enclosure and an ASUS enclosure with a CD-RW, on both Intel and
     NEC controllers.

     Note: The ALi enclosure is currently very SLOW, due to some issue
     with taking too long to notice that the QTD is complete.  This
     requires more investigation.

ehci.c (1.56); author: mycroft
     Failure to properly mask off UE_DIR_IN from the endpoint address
     was causing OHCI_ED_FORMAT_ISO and EHCI_QH_HRECL to get set
     spuriously, causing rather interesting lossage.

     Suddenly I get MUCH better performance with ehci...

ehci.c (1.58); author: mycroft
     Fix a stupid bug in ehci_check_intr() that caused use to try to
     complete a transaction that was still running.  Now ehci can
     handle multiple devices being active at once.

ehci.c (1.59); author: enami
     As the ehci_idone() now uses the variable `epipe'
     unconditionally, always declare it (in other words, make this
     file compile w/o EHCI_DEBUG).

ehci.c (1.60); author: mycroft
     Remove comment about the data toggle being borked.

ehci.c (1.61); author: mycroft
     Update comment.

ehci.c (1.62); author: mycroft
     Adjust a couple of comments to make it clear WTF is going on.

ehci.c (1.63); author: mycroft
     Fix an error in a debug printf().

ehci.c (1.64), ehcireg.h (1.17); author: mycroft
     Further cleanup of toggle handling.  Now that we use EHCI_QH_DTC,
     we don't need to fiddle with the TOGGLE bit in the overlay
     descriptor, so minimize how much we fuss with it.

Obtained from:   NetBSD
2004-06-26 00:52:37 +00:00
sos
2c69c72b78 Add support for LSI type software RAID's.
Made possible by: John Cagle @ HP
2004-06-25 21:21:59 +00:00
phk
2cf7db632c Use generic routines for BREAK and modem control ioctls.
This eliminates the need for a local ioctl method.
2004-06-25 20:33:52 +00:00
phk
582ab1ec6f Use generic modem control and BREAK ioctl handling. This eliminated
the need for a local ioctl handler.
2004-06-25 20:32:51 +00:00
julian
dfb6d51195 Convert Netgraph to use mbuf tags to pass its meta information around.
Thanks to Sam for importing tags in a way that allowed this to be done.

Submitted by:	Gleb Smirnoff <glebius@cell.sick.ru>
Also allow the sr and ar drivers to create netgraph versions of their modules.
Document the change to the ksocket node.
2004-06-25 19:22:05 +00:00
josef
1317204d7b Fix uninitialized variable, that breaks the build.
Approved by: hmp
Reviewed by: chris
Pointy hat to: josef (for ignoring warning)
2004-06-25 16:34:33 +00:00
grehan
709ee22adb - set resid correctly so that a failed seek (e.g. end of file) returns
correctly
- included required <sys/module.h>
2004-06-25 13:43:56 +00:00
grehan
976ffba921 Catchup to now-required <sys/module.h> for PowerPC 2004-06-25 13:42:48 +00:00
phk
dfb11f656e Use generic support for BREAK and modem control ioctls 2004-06-25 10:54:46 +00:00
phk
6afc611f2d Use generic support for BREAK and modem control ioctls. 2004-06-25 10:54:05 +00:00
phk
df5acb7bc0 Use generic support for modemcontrol and BREAK ioctls. 2004-06-25 10:51:33 +00:00
scottl
b76ce33197 Fix a typo that made the busdma tag have a 0 highaddr. This driver heavily
abuses busdma in other ways, and those will likely be fixed another day.
2004-06-24 18:30:08 +00:00
ambrisko
08157e234b Add PCI Device ID for 6300ESB ICH. If allocating 16 bytes fails then try 32.
This is also require for 6300ESB.
2004-06-24 18:21:28 +00:00
josef
ed1e209050 Change the possibility to configure pcm(4) via boot/loader.conf
to use boot/device.hints now

As discussed on cvs-src@

Reviewed by:	Hiten Pandya <hmp@backplane.com>
2004-06-24 17:41:20 +00:00
phk
04ac763124 Use the new serial port definitions for modemsignals. 2004-06-24 10:07:28 +00:00
njl
4e2f43832b Update some comments and remove non-standard notation. 2004-06-24 06:37:23 +00:00
njl
634b35494e Add a quirks array based on matching ACPI tables. The entries in this file
are currently all bad BIOS revisions that will never be able to support
ACPI.  They were derived by examining which BIOS's are blacklisted by other
operating systems.  Other types of quirks will be possible here as well.
2004-06-24 06:27:05 +00:00
jb
dfc6d273f2 Sync to usbdevs 1.183 2004-06-24 05:25:04 +00:00
jb
40584751b2 Add Delorme Publishing Earthmate GPS 2004-06-24 05:05:56 +00:00
obrien
58e58438be Better OFW console support on Sun Ultra2 machines.
Ultra2 users may want to set OFWCONS_POLL_HZ to a value of '20'.
I have left default value at '4' as higher values can consume a more
than is acceptable amount of CPU, and we don't have a consensus yet
what is an optimal value.

Submitted by:	Pyun YongHyeon <yongari@kt-is.co.kr>
2004-06-24 02:57:11 +00:00
njl
eba0ce4c5f Attach the correct handle, not the one that was just deleted. Also,
remove some duplicated code.
2004-06-24 01:57:31 +00:00
njl
ab7b1075ef Run the power off code directly instead of using indirection through
smp_rendezvous() to ensure we run on the BSP.  This reverts rev 1.128.
Add a comment indicating that MI code should be the one that runs all
shutdown functions on the BSP with the APs halted.  This should work
around problems in power off while waiting for the MI code to be improved.
2004-06-24 00:48:45 +00:00
njl
1f3c0d8118 Use uintmax_t for CPU statistics and add a cast to prevent truncation of
the statistics in a multiply.

Pointed out by:	YONETANI Tomokazu
2004-06-24 00:38:51 +00:00
rik
7c1f24f113 Use bus_dma* instead of contigmalloc()+vtophys() for RELENG_5. 2004-06-23 18:13:10 +00:00
jhb
cb992566ca - Defer BUS_CONFIG_INTR() on ACPI IRQ resources until the resources are
actually used.  For most ACPI devices this means deferring the call
  until bus_alloc_resource().
  - Add a function acpi_config_intr() to call BUS_CONFIG_INTR() for an
    ACPI IRQ resource using the trigger mode and polarity information
    stored in the ACPI resource object.
  - Add a function acpi_lookup_irq_resource() to lookup the ACPI IRQ
    resource that corresponds to a specified rid and new-bus resource.
  - Have the ACPI PCI bridge driver call BUS_CONFIG_INTR() on interrupts
    that it routes through link devices.
- Remove needactivate variable from acpi_alloc_resource() by changing the
  function not modify the flags variable but just mask off RF_ACTIVE when
  calling rman_reserve_resource().

Reviewed by:	njl (1, an earlier version)
2004-06-23 17:21:02 +00:00
jhb
a1484e7d3e Now that we associate a device_t with ACPI device handles, lookup the
device associated with any PCI devices that are enumerated in the ACPI
tree when adding children to an ACPI PCI bus and remove the duplicate
ACPI-only device_t and replace the device_t associated with the handle with
the ACPI and PCI aware device_t.
2004-06-23 15:08:40 +00:00
imp
c5906d37f5 Improve the kludge assignment of sub-bus numbers a little by fixing an
off by one error.  subbus must be > than pribus, so the right test is
<= not just <.

Reported by: Peter Losher
2004-06-23 13:49:46 +00:00
rik
7de2955c80 Make code more clean: backout support for 3.x branch. 2004-06-23 11:23:54 +00:00
le
f3a83f0723 MFNetBSD 1.60, author: augustss
Several changes:
    * Implement read for ulpt.
    * If the device is not opened for reading, occasionally drain any
      data the printer might have (but don't hammer the printer with reads).
    * Lower the buffer size to one page.
   The driver seems to work with more printers now.

Obtained from: NetBSD
2004-06-23 11:16:12 +00:00
phk
347e6a87e3 save a few redundant lines by moving the retry loop further backwards. 2004-06-23 10:28:09 +00:00
ps
069fb92824 Reset the update flag when scanning for new devices. 2004-06-22 23:05:06 +00:00
phk
ace6a2a6f7 Remove the TIOCDCDTIMESTAMP option.
The RFC-2783 PPS-API (<sys/timepps.h>) provides better and more
configurable service.
2004-06-22 20:32:17 +00:00
ps
a1bdd1093e Use the maximum physical bus when rescanning those targets. This
fixes a panic on cards which do not have any drives attached.
2004-06-22 17:39:57 +00:00
sos
166655f4a8 Use the right ordering of args on mtx_init(). No functional changes
since the args in question was all zero's.

Found by: Jimmy Olgeni <olgeni@FreeBSD.org>
2004-06-22 11:18:25 +00:00
brueffer
d0a100c886 Fix typos and add spaces before `(' in some comments
Submitted by:	markus
Approved by:	njl
MFC after:	3 days
2004-06-22 08:23:26 +00:00
le
4e3007919c Catch up with g_dev_open() changes and pass over the current thread
pointer.

Submitted by:    cperciva
2004-06-22 06:38:01 +00:00
phk
0033eabc1b Put the pre FreeBSD-2.x tty compat code under BURN_BRIDGES. 2004-06-21 22:57:16 +00:00
ps
a5b5031c52 on media exchange, update/rescan the drives. This allows a volume
in a failed stated to come back on-line without a reboot.
2004-06-21 22:57:10 +00:00
ps
f0bec239ac There is no need to call ciss_media_accept async anymore since all
notify events are handled in a kthread.
2004-06-21 21:56:57 +00:00
green
acfb823f3f Call the detach function with g_waitfor_event() so that it can access
the GEOM topology.

There are still issues with not detaching from cam correctly such that
upon a device detach there's an invalid pointer dereference from the
later call to cam_rescan().
2004-06-21 20:42:03 +00:00
scottl
3eaa7bd6e0 Add SCSI passthrough support to CISS. This allows devices like tape drives
that are on a CISS bus to be exported up to CAM and made available as normal
devices.  This will typically add one or two buses to CAM, which will be
numbered starting at 32 to allow room for CISS proxy buses.  Also, the CISS
firmware usually hides disk devices, but these can also be exposed as 'pass'
devices if you set the hw.ciss.expose_hidden_physical tunable.

Sponsored by:	Tape Laboratories, Inc.
MFC After: 3 days
2004-06-21 20:18:40 +00:00
phk
44cdf7deb4 Give control devices their own cdevsw{} so that we can eliminate them
from the trafic functions.

Do not use com_addr() when we don't need it.
2004-06-21 20:09:23 +00:00
gallatin
ae2a2c5a14 Prevent the rp driver from panic'ing on first access and make at
least the pci device unloadable

- Use ttymalloc() rather than a plain  malloc to allocate the
  rp->rp_tty ttys.  This is now required due to the recent locking
  changes to ttys and prevents a panic due to locking an unitialized
  t_mtx.

- Allow the pci driver to be unloaded.  This involved moving
  the call rp_releaseresource() to the end of rp_pcireleaseresource(),
  since rp_pcireleaseresource() uses ctlp->dev, which is freed
  by rp_releaseresource().

- Allow the generic part of the driver to be unattached by providing
  a hook to cancel timeouts.

Glanced at by: obrien
2004-06-21 13:02:25 +00:00
scottl
05c25483b4 Include module.h
Submitted by:	Koop Mast
2004-06-21 07:27:34 +00:00
josef
95e075acdf Enable pcm to read kenv variables to set default values for
mixer channels.

e.g.: pcm0.line=0

to muten input line per default.

Approved by:    cg
Reviewed by:    le, stefanf
Requested by:   Eugene Grosbein <eugen@grosbein.pp.ru> (implicitly)
PR:             kern/63771
2004-06-20 15:38:11 +00:00
le
b427022273 MFNetBSD 1.15, author: mycroft
Fix an unimportant typo.
2004-06-20 15:32:19 +00:00
markm
850ccbe37b Micro-tweaking. 2004-06-20 13:50:50 +00:00
sanpei
9aedd7799e Sync to 1.182 of usbdevs 2004-06-19 22:17:34 +00:00
sanpei
6042953b4c Add support Microtune Bluetooth dongle
PR:		kern/68049
Submitted by:	Markus Brueffer <markus@brueffer.de>
2004-06-19 22:16:03 +00:00
njl
6f4685cc9a Add more precision to the cx_usage sysctl output and special-case 0%.
Submitted by:	YONETANI Tomokazu <qhwt+freebsd-acpi AT les.ath.cx>
2004-06-19 02:27:23 +00:00
njl
3a20dac2f5 Remove compat code and unused lock declarations. 2004-06-18 17:58:11 +00:00
njl
cb82c4351b Remove compat defines. 2004-06-18 17:56:45 +00:00
simokawa
94bdc181d7 Fix the description of hw.firewire.sbp.exclusive_login.
Submitted by: KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
2004-06-18 08:02:49 +00:00
imp
03002ff968 A couple more style(9) nits I should have included in last commit 2004-06-18 01:28:54 +00:00
imp
1b1e48b58f Style nits in the prototypes 2004-06-18 01:27:19 +00:00
sos
86c6c2575c Up SiI reset wait a bit, some devices got lost. 2004-06-17 21:36:10 +00:00
phk
40dd98a3bd Second half of the dev_t cleanup.
The big lines are:
	NODEV -> NULL
	NOUDEV -> NODEV
	udev_t -> dev_t
	udev2dev() -> findcdev()

Various minor adjustments including handling of userland access to kernel
space struct cdev etc.
2004-06-17 17:16:53 +00:00
green
16b3d5deee atapicam(4) is currently off by three orders of magnitude regarding the
timeout values in the CAM CCBs.  Divide by 1000 to get values in seconds
which are what ata(4) timeouts internally use.

This does lose granularity, though, and small values can now round down
to zero.  It's probably worth making all ata(4) timeouts in terms of
hz/ticks/milliseconds/something.
2004-06-17 07:29:56 +00:00
ambrisko
d68963cafc While setting up a transmit packet disable interupts on the card then
re-enable them after we are done setting up the packet.  This seems
to fix the MPI350 newer firmware hangs.
2004-06-17 02:19:11 +00:00
phk
dfd1f7fd50 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
ps
6e7aa9fe96 If a device is not ONLINE, do not attempt to submit any commands
or I/O to the volume.  This solves a panic when removing a disk in
a RAID 0 volume.

Reported by:	le
2004-06-15 19:40:47 +00:00
njl
def38ca92f s/device_get_handle/acpi_get_handle
Submitted by:	Hiroyuki Aizu
2004-06-15 16:49:20 +00:00
dfr
95f803fb72 Fix spelling. 2004-06-15 16:03:49 +00:00