Home | History | Annotate | Download | only in qbus
History log of /src/sys/dev/qbus/rl.c
RevisionDateAuthorComments
 1.53  07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.52  24-Apr-2021  thorpej branches: 1.52.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.51  22-May-2017  ragge branches: 1.51.26;
Update copyright notice for Ludd (remove clause 3 & 4).
 1.50  26-Apr-2015  mlelstv Use C99-style initializers for struct dkdriver.
 1.49  02-Jan-2015  christos We have three sets of DTYPE_ constants in the kernel:
altq Drop Type
disklabel Disk Type
file Descriptor Type
(not to mention constants that contain the string DTYPE).
Let's make them two, by changing the disklabel one to be DisK TYPE since the
other disklabel constants seem to do that. Not many userland programs use
these constants (and the ones that they do are mostly in ifdefs). They will
be fixed shortly.
 1.48  31-Dec-2014  christos make more drivers use disk_ioctl, and add a dev parameter to it so that
we can merge the "easy" disklabel ioctls to it. Ultimately all this will
go do dk_ioctl once all the drivers have been converted.
 1.47  31-Dec-2014  christos Centralize wedge ioctls in disk_ioctl.
 1.46  09-Nov-2014  mlelstv branches: 1.46.2;
support DIOCMWEDGES ioctl
 1.45  25-Jul-2014  dholland Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.44  25-Jul-2014  dholland Add d_discard to all struct bdevsw instances I could find.

I've set them all to nodiscard. Some of them (wd, dk, vnd, ld,
raidframe, maybe cgd) should be implemented for real.
 1.43  16-Mar-2014  dholland branches: 1.43.2;
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.42  18-Apr-2009  tsutsui branches: 1.42.12; 1.42.22; 1.42.26;
Remove extra whitespace added by a stupid tool.
XXX: more in src/sys/arch
 1.41  18-Mar-2009  cegger bcopy -> memcpy
 1.40  13-Jan-2009  yamt branches: 1.40.2;
g/c BUFQ_FOO() macros and use bufq_foo() directly.
 1.39  11-Jun-2008  drochner branches: 1.39.4;
fix some missing pieces of device/softc split
 1.38  11-Mar-2008  matt branches: 1.38.2; 1.38.4; 1.38.6; 1.38.8;
Rototill the vax code. Switch to devicet/PRIV_ALLOC. Cleanup vax autoconf
code. Move to prototype definitions. staticfy, constify, avoid casting.
Use device_* accessors.
 1.37  19-Oct-2007  ad branches: 1.37.12; 1.37.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.36  08-Oct-2007  ad branches: 1.36.2;
Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
 1.35  29-Jul-2007  ad branches: 1.35.4; 1.35.6; 1.35.8; 1.35.10;
It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.34  21-Jul-2007  ad Replace some uses of lockmgr().
 1.33  10-Mar-2007  christos branches: 1.33.2; 1.33.10;
whitespace
 1.32  09-Mar-2007  he Cast to char* before doing pointer arithmetic.
 1.31  04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.30  29-Mar-2006  thorpej branches: 1.30.14;
Use device_private().
 1.29  28-Mar-2006  thorpej Use device_unit().
 1.28  25-Mar-2006  thorpej Use device_parent().
 1.27  11-Dec-2005  christos branches: 1.27.4; 1.27.6; 1.27.8; 1.27.10; 1.27.12;
merge ktrace-lwp.
 1.26  15-Oct-2005  yamt - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
from sys/bufq.h to sys/bufq_impl.h.
(is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c. (not tested)
 1.25  27-Jun-2005  ragge branches: 1.25.2;
Fixes due to cast-qual addition.
 1.24  26-Feb-2005  simonb White space nits.
 1.23  28-Oct-2004  yamt branches: 1.23.4; 1.23.6;
move buffer queue related stuffs from buf.h to their own header, bufq.h.
 1.22  25-Sep-2004  thorpej Add support for wedges to the RL01/RL02 disk driver.
XXX Can't do autodiscovery here, since we can't do I/O in rlattach().
 1.21  10-May-2003  thorpej branches: 1.21.2;
Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself. This paves the way for some future changes.
 1.20  02-May-2003  dsl Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
 1.19  02-Apr-2003  he Change SBSIZE -> SBLOCKSIZE, to track changes caused by the UFS2 merge.
 1.18  01-Jan-2003  thorpej Use aprint_normal() in cfprint routines.
 1.17  23-Oct-2002  jdolecek merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.16  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.15  30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.14  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.13  06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.12  22-Jul-2002  hannken Convert to new device buffer queue interface.

Approved by: Anders Magnusson <ragge@netbsd.org>
 1.11  23-Mar-2002  ragge branches: 1.11.2;
Call rlreset() per controller, not per disk.
Be more informative about the state of the disk (locked, unloaded etc...)
Send NULL as proc pointer to bus_dma_load if B_PHYS is not set.
Break out softc's from rl.c to rlvar.h for inclusion elsewhere.
 1.10  13-Nov-2001  lukem add RCSIDs
 1.9  19-Jun-2001  wiz branches: 1.9.2; 1.9.4;
`existent', not `existant'
 1.8  12-Apr-2001  thorpej splimp -> splbio.
 1.7  08-Jan-2001  fvdl branches: 1.7.2;
Return error in the case of using ODIOCGDINFO or ODIOCGDEFLABEL when
the number of partitions is > OLDMAXPARTITIONS. This is better
than silently truncating the label (don't want to silently throw
away partitions when using an old disklabel binary on a label with
> 8 partitions). From Enami Tsugutomo.
 1.6  07-Jan-2001  fvdl Adapt all disk devices in MI directories to handle ODIOC* calls
for ports that have bumped MAXPARTITIONS (and thus define
__HAVE_OLD_DISKLABEL).
 1.5  05-Jun-2000  matt branches: 1.5.2; 1.5.4;
Adjust to new evcnt stuff.
 1.4  04-Jun-2000  matt More event counter stuff. Plus a little cruft cleanup while doing it.
 1.3  19-May-2000  thorpej branches: 1.3.2;
A foolish consistency; most parts of the kernel use bp->b_data, so
change these from bp->b_un.b_addr to bp->b_data, as well. This also
allows us more flexibility to experiment with other data buffer types
hung off of struct buf.
 1.2  30-Apr-2000  ragge Change to use new ubareset() functionality.
 1.1  22-Apr-2000  ragge Add the famous "rl" disk.
 1.3.2.1  22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.5.4.4  21-Apr-2001  bouyer Sync with HEAD
 1.5.4.3  18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.5.4.2  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.5.4.1  05-Jun-2000  bouyer file rl.c was added on branch thorpej_scsipi on 2000-11-20 11:42:50 +0000
 1.5.2.1  01-May-2001  he Pull up revisions 1.6-1.7 (requested by fvdl):
Increase the number of BSD disklabel partitions on i386 to 16.
 1.7.2.8  03-Jan-2003  thorpej Sync with HEAD.
 1.7.2.7  11-Nov-2002  nathanw Catch up to -current
 1.7.2.6  18-Oct-2002  nathanw Catch up to -current.
 1.7.2.5  17-Sep-2002  nathanw Catch up to -current.
 1.7.2.4  01-Aug-2002  nathanw Catch up to -current.
 1.7.2.3  01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.7.2.2  14-Nov-2001  nathanw Catch up to -current.
 1.7.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.9.4.1  10-Oct-2001  fvdl Convert all remaining devices.
 1.9.2.4  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.9.2.3  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.9.2.2  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9.2.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.11.2.3  29-Aug-2002  gehenna catch up with -current.
 1.11.2.2  07-Jun-2002  gehenna make this compile
 1.11.2.1  16-May-2002  gehenna Add the block/character device switch.
Replace the hard-coded major with calling devsw API.
 1.21.2.8  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.21.2.7  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.21.2.6  04-Feb-2005  skrll Adapt to branch.
 1.21.2.5  02-Nov-2004  skrll Sync with HEAD.
 1.21.2.4  19-Oct-2004  skrll Sync with HEAD
 1.21.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.21.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.21.2.1  12-Aug-2004  skrll Adapt to new world order.

Vax GENERIC compiles.
 1.23.6.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.23.4.1  29-Apr-2005  kent sync with -current
 1.25.2.4  17-Mar-2008  yamt sync with head.
 1.25.2.3  27-Oct-2007  yamt sync with head.
 1.25.2.2  03-Sep-2007  yamt sync with head.
 1.25.2.1  21-Jun-2006  yamt sync with head.
 1.27.12.2  31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.27.12.1  28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.27.10.1  19-Apr-2006  elad sync with head.
 1.27.8.1  01-Apr-2006  yamt sync with head.
 1.27.6.1  22-Apr-2006  simonb Sync with head.
 1.27.4.1  09-Sep-2006  rpaulo sync with head
 1.30.14.1  12-Mar-2007  rmind Sync with HEAD.
 1.33.10.1  15-Aug-2007  skrll Sync with HEAD.
 1.33.2.3  23-Oct-2007  ad Sync with head.
 1.33.2.2  20-Aug-2007  ad - Alter disk attach/detach to fix a panic when closing a vnd device.
- Sync with HEAD.
 1.33.2.1  19-Aug-2007  ad - Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).
 1.35.10.2  29-Jul-2007  ad It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
 1.35.10.1  29-Jul-2007  ad file rl.c was added on branch matt-mips64 on 2007-07-29 12:15:45 +0000
 1.35.8.1  14-Oct-2007  yamt sync with head.
 1.35.6.2  23-Mar-2008  matt sync with HEAD
 1.35.6.1  06-Nov-2007  matt sync with HEAD
 1.35.4.1  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.36.2.1  25-Oct-2007  bouyer Sync with HEAD.
 1.37.16.3  17-Jan-2009  mjf Sync with HEAD.
 1.37.16.2  29-Jun-2008  mjf Sync with HEAD.
 1.37.16.1  03-Apr-2008  mjf Sync with HEAD.
 1.37.12.1  24-Mar-2008  keiichi sync with head.
 1.38.8.1  18-Jun-2008  simonb Sync with head.
 1.38.6.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.38.4.1  04-May-2009  yamt sync with head.
 1.38.2.1  17-Jun-2008  yamt sync with head.
 1.39.4.2  28-Apr-2009  skrll Sync with HEAD.
 1.39.4.1  19-Jan-2009  skrll Sync with HEAD.
 1.40.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.42.26.1  18-May-2014  rmind sync with head
 1.42.22.2  03-Dec-2017  jdolecek update from HEAD
 1.42.22.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.42.12.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.43.2.1  10-Aug-2014  tls Rebase.
 1.46.2.3  28-Aug-2017  skrll Sync with HEAD
 1.46.2.2  06-Jun-2015  skrll Sync with HEAD
 1.46.2.1  06-Apr-2015  skrll Sync with HEAD
 1.51.26.1  21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.52.8.1  04-Aug-2021  thorpej Adapt to CFARGS().

RSS XML Feed