Commit Graph

471 Commits

Author SHA1 Message Date
jdolecek
62fb613155 move ata_queue_alloc(1) and ata_queue_free() calls to ata_channel_init()
and ata_channel_destroy() respectively, to make attachment code simpler,
and to make it easier to spot special queue manipulation like cmdide(4)

on topic of PR kern/52606
2017-10-20 07:06:05 +00:00
jdolecek
46f3d27a6d adapt for NCQ branch merge too 2017-10-07 20:02:07 +00:00
christos
1a4bdd5296 remove my copyright. 2017-06-03 14:46:29 +00:00
msaitoh
5457a8e2a4 - Use aprint*() more in xxx_attach().
- Add missing aprint_naive("\n").
- Remove extra spaces and tabs.
- KNF.
2016-07-14 10:19:05 +00:00
msaitoh
d21ffc75e5 - Use aprint*() instead of printf() in xxx_attach().
- Add missing aprint_naive("\n");
- KNF
2016-07-14 04:00:45 +00:00
msaitoh
71fbb921c3 KNF. No functional change. 2016-07-11 11:31:49 +00:00
christos
963a11e790 regen 2015-11-19 19:16:28 +00:00
christos
5432203721 Add another le board. 2015-11-19 19:16:10 +00:00
riastradh
233f556c2e Convert sys/dev to use <sys/rndsource.h>. 2015-04-13 16:33:23 +00:00
chs
cbab9cadce split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
2012-10-27 17:17:22 +00:00
bouyer
9edd4d81c5 Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.
2012-07-31 15:50:31 +00:00
jakllsch
102f7b2016 Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@
2012-07-26 20:49:44 +00:00
bouyer
03c9df05c6 Add sata Port MultiPlier (PMP) support to the ata bus layer,
as described in
http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html
PMP support in integrated to the atabus layer.
struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive
(renamed to ch_ndrives) closely reflects the size of the ch_drive[] array.
Add helper functions atabus_alloc_drives() and atabus_free_drives()
to manage ch_drive[]/ch_ndrives.
Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify
how much drive they really support (master/slave or single).
ata_reset_drive() callback gains a uint32_t *sigp argument which,
when not NULL, will contain the signature of the device being reset.
While there, some cosmetic changes:
- added a drive_type enum to ata_drive_datas, and stop encoding the
  probed drive type in drive_flags (we were out of drive flags anyway).
- rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this
  really is
- remove ata_channel->ata_drives, it's redundant with the pointer in
  ata_drive_datas
- factor out the interpretation of SATA signatures in sata_interpet_sig()

propagate these changes to the ATA HBA drivers, and add support for PMP
to ahcisata(4) and siisata(4).

Thanks to:
- Protocase (http://www.protocase.com/) which provided a system
  with lots of controllers, SATA PMP and drive slots
- Conservation Genomics Laboratory, Department of Biology, New Mexico State
  University for hosting the above system
- Brook Milligan, who set up remote access and has been very responsive
  when SATA cable move was needed
2012-07-02 18:15:44 +00:00
tls
7b0b7dedd9 Entropy-pool implementation move and cleanup.
1) Move core entropy-pool code and source/sink/sample management code
   to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
   source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
   avoid expensive operations on disabled entropy sources; make the
   rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
   have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
   system events, and skew between clocks, with a sample implementation
   for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files).  Tested with release
builds on amd64 and evbarm and live testing on amd64.
2012-02-02 19:42:57 +00:00
jakllsch
3974ddef5c We need to hold the lock during mpu_find(). 2011-12-07 17:35:01 +00:00
christos
f5e469b78a make joy code consistent (avoid games with pointers), and fix the isa softc
declaration
2011-12-05 19:20:54 +00:00
mrg
8de08fa998 put back IPL_AUDIO and splaudio(), at the request of rmind. they are
aliases and now we can easily revert audio to IPL_VM if necessary,
without having to revert the whole branch.
2011-11-24 03:35:56 +00:00
jmcneill
8a962f23f2 Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

  Add MP locking to the audio drivers.

  Making the audio drivers MP safe is necessary before efforts
  can be made to make the VM system MP safe.

  The are two locks per device instance, an ISR lock and
  a character device lock. The ISR lock replaces calls to
  splaudio()/splx(), and will be held across calls to device
  methods which were called at splaudio() before (e.g.
  trigger_output). The character device lock is held across
  calls to nearly all of the methods, excluding some only
  used for initialization, e.g. get_locks.

Welcome to 5.99.57.
2011-11-23 23:07:28 +00:00
jakllsch
bc81369a28 Set "mode" to 2 at the correct time.
Fixes recording on some isapnp(4) wss(4) chips.
2011-11-22 19:33:38 +00:00
tsutsui
ff2f721f5c Split device_t/softc of all ad1848 variants properly. Compile test only.
Please check all attribute users in all files.* on device_t/softc split.

XXX: not sure if gus(4) needs device_t in ad1848_isa_softc
2011-06-02 14:12:24 +00:00
uebayasi
8184d5dc03 Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants.  These are provided by sys/param.h now.
2010-11-13 13:51:57 +00:00
jym
0ae4c88a36 PRIxPADDR instead of %lx to print bus_addr_t/paddr_t variables. 2010-05-23 23:53:36 +00:00
tsutsui
9cb526aa88 Split device_t/softc. Based on patch from cegger@.
ess_pnpbios.c and ess_ofisa.c fixes by me.

Tested on ess_isapnp.c, and no crash with ess_ofisa.c on shark.
2010-05-22 16:35:00 +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
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
3b0a685f2b Split device_t/softc. Tested only on cs at ofisa on shark. 2009-09-22 14:55:19 +00:00
tsutsui
3c2460ce71 Make local functions static. 2009-09-22 13:22:53 +00:00
tsutsui
2f25e6cf41 - make local functions/variables static
- use __arraycount()
2009-09-22 13:20:36 +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
48ffe7c901 Use proper types or variables for device_t and softc. 2009-09-17 18:09:51 +00:00
jmcneill
41fc254aa6 Drop the string 'ISA Plug 'n Play device support', it's not something to
brag about anymore.
2009-08-23 15:56:56 +00:00
cegger
df73a4b15e struct device * -> device_t, no functional changes intended. 2009-05-12 10:16:35 +00:00
cegger
67c088a49a struct cfdata * -> cfdata_t, no functional changes intended. 2009-05-12 10:07:55 +00:00
cegger
06e69f3860 struct device * -> device_t 2009-05-05 12:10:07 +00:00
cegger
c363a9cb62 bzero -> memset 2009-03-18 16:00:08 +00:00
cegger
f7d20361b0 ansify function definitions 2009-03-15 15:40:33 +00:00
dsl
82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
dsl
454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
jnemeth
3650fe6bb4 add a comment explaining how to regenerate isapnpdevs.h and isapnpdevs.c 2009-01-21 14:22:46 +00:00
apb
96230fab84 Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
2008-10-19 22:05:19 +00:00
christos
91ca465c78 device_t changes, pmf, minor knf. 2008-08-27 05:33:47 +00:00
cegger
7453f200da struct device * -> device_t
struct cfdata * -> cfdata_t
2008-07-04 04:53:41 +00:00
cegger
1c3c0ccc58 make this build again after device_t/softc split 2008-07-04 04:49:36 +00:00
drochner
363285ca02 split device/softc (tested with an@pcmcia) 2008-07-03 18:10:07 +00:00
drochner
cc29fcf8b9 constify the pcmcia/cardbus method tables 2008-06-26 12:33:17 +00:00
martin
cd22f25e6f Move TNF licenses to 2 clause form 2008-05-02 18:11:04 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00