Commit Graph

2243 Commits

Author SHA1 Message Date
jakllsch 59a03cddc2 This only needs one bus_space_tag_t.
While here, rename one of the bus_space_handle_ts
to be be descriptive of its function.

Fixes crash caused by uninitialized bus_space_tag_t
discovered by Paul Goyette.
2010-05-02 18:49:13 +00:00
dyoung ad6e139a80 Add default implementations for bus_space_is_equal(9),
bus_space_tag_create(9), and bus_space_tag_destroy(9).  Use
bus_space_is_equal(9) throughout the kernel to compare
bus_space_tag_t's.  Tested on i386 and on sparc64.
2010-04-19 18:24:26 +00:00
joerg 58e867556f Push the bpf_ops usage back into bpf.h. Push the common ifp->if_bpf
check into the inline functions as well the fourth argument for
bpf_attach.
2010-04-05 07:19:28 +00:00
dyoung f52f7d91ef Do not use unitialized bus_space_tag_t's. Use the tag(s) from the
attachment arguments.
2010-03-24 01:13:30 +00:00
dyoung 8b0029011b isadma.c: #if 0 some diagnostic code that compares two bus_space_tag_t's.
pcdisplay.c: #if 0 some code that compares two bus_space_tag_t's
    in order to see if pcdisplay0 is console.  It does not seem to
    be helpful to compare the tags; maybe the author intended to
    compare some other bus property?

MI code should not compare an opaque type such as bus_space_tag_t!
2010-03-22 22:30:58 +00:00
dyoung f5423e5e40 Do not disestablish the interrupt handler inside of the interrupt
handler!  Stops a crash on the HP Pavilion N3270.

Cosmetic: sc->ih is a pointer, so set to NULL instead of 0.  Compare
with NULL instead of testing truth.
2010-03-22 22:25:26 +00:00
cnst 291f4cc576 support W83667HG (0xa5) in wbsio(4); its hw mon is already supported by lm(4) as W83627DHG (0xc1) 2010-03-19 02:17:41 +00:00
he 921b8ba089 Allow this driver to build for ofppc as well. 2010-03-16 12:53:17 +00:00
tsutsui 2253fb2fe8 Some KNF. 2010-03-13 15:46:09 +00:00
tsutsui 329daadadb - include "ioconf.h" for struct cfdriver we_cd
- remove unused macro
2010-03-13 15:42:09 +00:00
tsutsui 8f7c20ed4f Put several fixes to ne(4) driver for better 8 bit mode support,
especially on RTL8019AS which is also used for non-ISA local bus of
embedded controllers and some m68k machines like atari and x68k.

 * move RTL8019 probe and attach code from each bus attachment
   to MI ne2000_detect() and ne2000_attach()
 * change a method for backend and attachment to specify 8 bit mode
   to use a new sc->sc_quirk member, instead of sc->sc_dmawidth
 * handle more NE2000 8 bit mode specific settings, including
   bus_space(9) access width and available size of buffer memory
 * add a function to detect NE2000 8 bit mode
   (disabled by default, but enalbed by options NE2000_DETECT_8BIT
    to avoid possible regression on various ISA clones)
 * fix ipkdb attachment accordingly (untested)

Tested on two NE2000 ISA variants (RTL8019AS and another clone named UL0001)
in both 8 bit and 16 bit mode on i386. "Looks good" from nonaka@.

See my post on tech-kern for details:
http://mail-index.NetBSD.org/tech-kern/2010/02/26/msg007423.html
2010-03-03 13:39:57 +00:00
dyoung c1b390d493 A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
2010-02-24 22:37:54 +00:00
cnst 51998ed2d7 New wbsio(4) driver for Winbond Super I/O attachment of lm(4) on any port.
http://mail-index.netbsd.org/tech-kern/2010/02/17/msg007338.html

Reviewed by <pgoyette>, <tech-kern>.
2010-02-21 05:16:29 +00:00
cegger 3b84dd90dd essattach: printf -> aprint_* 2010-01-23 17:22:04 +00:00
pooka 10fe49d72c Redefine bpf linkage through an always present op vector, i.e.
#if NBPFILTER is no longer required in the client.  This change
doesn't yet add support for loading bpf as a module, since drivers
can register before bpf is attached.  However, callers of bpf can
now be modularized.

Dynamically loadable bpf could probably be done fairly easily with
coordination from the stub driver and the real driver by registering
attachments in the stub before the real driver is loaded and doing
a handoff.  ... and I'm not going to ponder the depths of unload
here.

Tested with i386/MONOLITHIC, modified MONOLITHIC without bpf and rump.
2010-01-19 22:06:18 +00:00
pooka 58247e10a2 hp@isa was marked non-compiling and broken 14 years ago. I'm sure
the tens of well-tested changes since then have been necessary,
but now i'll just spoil the fun for everyone by sending the driver
to the attic.
2010-01-19 12:41:41 +00:00
dyoung cd6e1fbf91 Expand PMF_FN_* macros. 2010-01-08 19:53:10 +00:00
christos 0fbbcee76f make rhis compile. 2010-01-02 02:37:08 +00:00
christos 641f5484f1 convert to pmf 2010-01-02 01:42:49 +00:00
dsl 3cac425251 Add patch from PR/11805 2009-11-27 20:56:28 +00:00
rmind dbd9b86792 Remove some unecessary includes sys/user.h header. 2009-11-23 02:13:44 +00:00
dyoung bb858bb7d5 Call the common detach routine, com_detach(), and get out on error,
before starting the bus-specific detachment.

com_activate() is going away, so don't use it any more.
2009-11-12 20:28:32 +00:00
elric 022690d221 Assign copyright to TNF on these old files. 2009-10-27 23:04:41 +00:00
snj 7e82f68c7b Switch to a 2 clause license. Approved by joff@ (copyright holder). 2009-10-23 00:39:29 +00:00
cegger 24b93ceb8b use aprint_* in attach routines 2009-09-29 11:01:39 +00:00
tsutsui df90eec26b Make local functions static. 2009-09-22 16:44:08 +00:00
tsutsui 30d1cde9f5 Split device_t/softc. Tested only on cs at ofisa on shark. 2009-09-22 15:34:22 +00:00
tsutsui 3b0a685f2b Split device_t/softc. Tested only on cs at ofisa on shark. 2009-09-22 14:55:19 +00:00
tsutsui 5977843ffd Fix wrong softc size in CFATTACH_DECL(). (not cs_softc but cs_softc_isa) 2009-09-22 14:04:56 +00:00
tsutsui 3c2460ce71 Make local functions static. 2009-09-22 13:22:53 +00:00
tsutsui d7f21e6129 Don't declare ISA specific aic_isa_attach() in MI header, and
also make local functions in aic_isa.c static.
2009-09-22 13:18:28 +00:00
tsutsui 00eb8aa546 Split device_t/softc. Tested on AHA-1520B at ISA and ISAPnP.
XXX: ISA attachment shouldn't match cards in ISAPnP mode.
2009-09-22 12:56:06 +00:00
tsutsui c8a52f80ba Split device_t/softc. Tested on AHA-1542CF. 2009-09-21 08:12:47 +00:00
tsutsui 5dcfc285a0 Misc KNF and cosmetics, and remove unnecessary casts etc. 2009-09-17 18:14:41 +00:00
tsutsui 16c0f8385d Use device_private(), proper types or variables for device_t and softc.
(not yet split though)

No crash on gxemul emulating hpcmips mobilepro.
2009-09-14 13:41:15 +00:00
tsutsui 5770fb4ee0 u_intNN_t -> uintNN_t 2009-09-14 12:49:33 +00:00
tsutsui f3f3dfb33a Make compile with options DEBUG. 2009-09-12 18:52:25 +00:00
jmcneill f6062bf27a aprint-ify 2009-09-01 21:46:52 +00:00
jmcneill 41dd5e0736 Not much sense in printing 'AT Timer' when the 'attimer' driver attaches. 2009-08-23 16:02:53 +00:00
cegger 06ffd276b6 build fix: isa_detach_hook() needs isa_chipset_tag_t as first argument. 2009-08-19 16:23:28 +00:00
dyoung 40bc016e8a Let us safely detach the ISA bus and devices attaching to the ISA
bus:

1 Add isadetach() for detaching the ISA bus, and add some helper
  routines that release resources held for ISA DMA.

2 In isachilddetached(), forget references to child devices.

While I am here, change ISA_DMA_DRQ_ISFREE(...) == 0 to the simpler
expression, !ISA_DMA_DRQ_ISFREE(...).
2009-08-18 16:52:42 +00:00
haad f5b48500f1 Add support for DIOCGDISKINFO to disk like device drivers. Change
partutil.c::getdiskinfo to use it to get disk geometry info.
Use DIOCGWEDGEINFO ioctl to get information about partition size, if disk
driver doesn't support it use old DIOCGDINFO. This patch adds support for
wedge like devices(lvm logical volumes, ZFS zvol partitions) to newfs and
other tools.

No objections on tech-userlevel@.
2009-06-05 21:52:31 +00:00
cegger ab57cc6f1b struct device * -> device_t, no functional changes intended. 2009-05-12 09:10:15 +00:00
cegger 8a46564d1d struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 08:44:19 +00:00
cegger f2bccc0a8e struct device * -> device_t, use device_private() 2009-05-05 12:07:15 +00:00
dyoung 64670508f7 Detach pcppi0 at isa0 during shutdown. 2009-04-17 20:46:37 +00:00
mlelstv 485e52e2b3 attach and detach do not mix.
Create a new detach function that calls the parent function after
dealing with the private instance counter.
2009-04-10 10:18:50 +00:00
dyoung 99084a32b0 Decrease midi_pcppi_attached when midi at pcppi detaches. 2009-04-08 00:12:27 +00:00
dyoung 1de2a73134 Make pcppi(4) detach the "speaker" from attimer(4), so that the
corresponding attimer(4) resource is not perpetually busy: now it
is possible to detach and to reattach pcppi(4).  Make attimer(4)'s
device-detachment hook return EBUSY if pcppi(4) is still attached, so
that pcppi(4) cannot end up with a dangling pointer to attimer(4).
2009-04-07 22:30:09 +00:00
dyoung 00644496f7 Fix spelling: indrect -> indirect. 2009-04-07 21:48:46 +00:00