The NetBSD Project

CVS log for src/sys/dev/scsipi/cd.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev / scsipi

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.355.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 4 23:22:33 2026 UTC (11 days, 13 hours ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.355.2.1: preferred, colored; branchpoint 1.355: preferred, colored; next MAIN 1.356: preferred, colored
Changes since revision 1.355.2.1: +4 -2 lines
Sync with HEAD

Revision 1.357: download - view: text, markup, annotated - select for diffs
Thu Jul 16 06:19:25 2026 UTC (4 months ago) by mlelstv
Branches: MAIN
CVS tags: perseant-exfatfs-base-20261102, HEAD
Diff to: previous 1.356: preferred, colored
Changes since revision 1.356: +4 -2 lines
SCSI-2 and later define READ(6) as optional and READ(10) as mandatory
and some devices (e.g. the Linux iSCSI tgtd) reject the small commands.

MODE_SENSE(6) and MODE_SENSE(10) can both be optional, so it's possible
that a SCSI-2 device only implements READ(10) and MODE_SENSE(6), which
then needs further refinement.

Revision 1.355.2.1: download - view: text, markup, annotated - select for diffs
Sat Aug 2 05:57:03 2025 UTC (15 months, 2 weeks ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.355: preferred, colored
Changes since revision 1.355: +3 -3 lines
Sync with HEAD

Revision 1.356: download - view: text, markup, annotated - select for diffs
Sun Dec 1 20:23:45 2024 UTC (23 months, 2 weeks ago) by andvar
Branches: MAIN
CVS tags: perseant-exfatfs-base-20250801, netbsd-11-base, netbsd-11-1-RELEASE, netbsd-11-0-RELEASE, netbsd-11-0-RC7, netbsd-11-0-RC6, netbsd-11-0-RC5, netbsd-11-0-RC4, netbsd-11-0-RC3, netbsd-11-0-RC2, netbsd-11-0-RC1, netbsd-11
Diff to: previous 1.355: preferred, colored
Changes since revision 1.355: +3 -3 lines
s/assised/assisted/ in comment.

Revision 1.355: download - view: text, markup, annotated - select for diffs
Sat Jun 22 10:07:46 2024 UTC (2 years, 4 months ago) by palle
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base
Branch point for: perseant-exfatfs
Diff to: previous 1.354: preferred, colored
Changes since revision 1.354: +10 -4 lines
Add quirk for devices that does not handle READ_DISCINFO

Revision 1.354: download - view: text, markup, annotated - select for diffs
Sun Jun 26 21:00:28 2022 UTC (4 years, 4 months ago) by andvar
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-2-RELEASE, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.353: preferred, colored
Changes since revision 1.353: +5 -5 lines
s/Ramdom/Random/ in comments.

Revision 1.342.4.3: download - view: text, markup, annotated - select for diffs
Tue Feb 1 11:41:29 2022 UTC (4 years, 9 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-5-RELEASE, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE
Diff to: previous 1.342.4.2: preferred, colored; branchpoint 1.342: preferred, colored; next MAIN 1.343: preferred, colored
Changes since revision 1.342.4.2: +8 -10 lines
Pull up following revision(s) (requested by reinoud in ticket #1421):

	sys/dev/scsipi/cd.c: revision 1.351

Limit buffer size for device capabilities requests as a work-around for PR
kern/56109.

Revision 1.353: download - view: text, markup, annotated - select for diffs
Tue Oct 12 08:36:29 2021 UTC (5 years, 1 month ago) by andvar
Branches: MAIN
Diff to: previous 1.352: preferred, colored
Changes since revision 1.352: +7 -7 lines
fix various typos, mainly in comments.

Revision 1.352: download - view: text, markup, annotated - select for diffs
Sat Aug 21 23:00:32 2021 UTC (5 years, 2 months ago) by andvar
Branches: MAIN
Diff to: previous 1.351: preferred, colored
Changes since revision 1.351: +3 -3 lines
fix mainly same typos as in my previous commit but outside sys/dev/dm.

Revision 1.350.2.1: download - view: text, markup, annotated - select for diffs
Sat Apr 17 17:26:19 2021 UTC (5 years, 7 months ago) by thorpej
Branches: thorpej-cfargs
Diff to: previous 1.350: preferred, colored; next MAIN 1.351: preferred, colored
Changes since revision 1.350: +8 -10 lines
Sync with HEAD.

Revision 1.351: download - view: text, markup, annotated - select for diffs
Fri Apr 16 12:58:54 2021 UTC (5 years, 7 months ago) by reinoud
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.350: preferred, colored
Changes since revision 1.350: +8 -10 lines
Limit buffer size for device capabilities requests as a work-around for PR
kern/56109.

Revision 1.349.2.1: download - view: text, markup, annotated - select for diffs
Sat Apr 3 22:28:50 2021 UTC (5 years, 7 months ago) by thorpej
Branches: thorpej-futex
Diff to: previous 1.349: preferred, colored; next MAIN 1.350: preferred, colored
Changes since revision 1.349: +3 -3 lines
Sync with HEAD.

Revision 1.340.6.3: download - view: text, markup, annotated - select for diffs
Thu Feb 11 12:54:56 2021 UTC (5 years, 9 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE
Diff to: previous 1.340.6.2: preferred, colored; branchpoint 1.340: preferred, colored; next MAIN 1.341: preferred, colored
Changes since revision 1.340.6.2: +3 -3 lines
Pull up following revision(s) (requested by ryoon in ticket #1652):

	sys/dev/scsipi/cd.c: revision 1.350
	sys/dev/scsipi/sd.c: revision 1.331

PR 55986: Ryo Onodera: DK_BUSY must have mask as second argument. Make cd.c
consistent by also using __BIT()

Revision 1.342.4.2: download - view: text, markup, annotated - select for diffs
Thu Feb 11 12:53:28 2021 UTC (5 years, 9 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-2-RELEASE
Diff to: previous 1.342.4.1: preferred, colored; branchpoint 1.342: preferred, colored
Changes since revision 1.342.4.1: +3 -3 lines
Pull up following revision(s) (requested by ryoon in ticket #1203):

	sys/dev/scsipi/cd.c: revision 1.350
	sys/dev/scsipi/sd.c: revision 1.331

PR 55986: Ryo Onodera: DK_BUSY must have mask as second argument. Make cd.c
consistent by also using __BIT()

Revision 1.350: download - view: text, markup, annotated - select for diffs
Wed Feb 10 16:30:01 2021 UTC (5 years, 9 months ago) by christos
Branches: MAIN
CVS tags: thorpej-futex-base
Branch point for: thorpej-cfargs
Diff to: previous 1.349: preferred, colored
Changes since revision 1.349: +3 -3 lines
PR/55986: Ryo Onodera: DK_BUSY must have mask as second argument. Make cd.c
consistent by also using __BIT()

Revision 1.349: download - view: text, markup, annotated - select for diffs
Mon Oct 26 11:39:48 2020 UTC (6 years ago) by mlelstv
Branches: MAIN
Branch point for: thorpej-futex
Diff to: previous 1.348: preferred, colored
Changes since revision 1.348: +5 -5 lines
Avoid buffer overflow when copying from bounce buffer.
Fixes PR 54810

Don't use uninitialized pointer in split bounce buffer case and
free a partially allocated bounce buffer on error.

Revision 1.348: download - view: text, markup, annotated - select for diffs
Tue Sep 29 03:04:03 2020 UTC (6 years, 1 month ago) by msaitoh
Branches: MAIN
Diff to: previous 1.347: preferred, colored
Changes since revision 1.347: +3 -3 lines
s/settng/setting/

Revision 1.347: download - view: text, markup, annotated - select for diffs
Tue Sep 29 03:02:19 2020 UTC (6 years, 1 month ago) by msaitoh
Branches: MAIN
Diff to: previous 1.346: preferred, colored
Changes since revision 1.346: +3 -3 lines
s/implicitely/implicitly/

Revision 1.346: download - view: text, markup, annotated - select for diffs
Tue Sep 29 02:58:52 2020 UTC (6 years, 1 month ago) by msaitoh
Branches: MAIN
Diff to: previous 1.345: preferred, colored
Changes since revision 1.345: +3 -3 lines
s/occurence/occurrence/

Revision 1.345: download - view: text, markup, annotated - select for diffs
Tue Sep 29 02:49:56 2020 UTC (6 years, 1 month ago) by msaitoh
Branches: MAIN
Diff to: previous 1.344: preferred, colored
Changes since revision 1.344: +3 -3 lines
s/parition/partition/

Revision 1.341.6.3: download - view: text, markup, annotated - select for diffs
Tue Apr 21 18:42:38 2020 UTC (6 years, 6 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.341.6.2: preferred, colored; branchpoint 1.341: preferred, colored; next MAIN 1.342: preferred, colored
Changes since revision 1.341.6.2: +1 -1 lines
Sync with HEAD

Revision 1.343.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 20 11:29:07 2020 UTC (6 years, 6 months ago) by bouyer
Branches: bouyer-xenpvh
Diff to: previous 1.343: preferred, colored; next MAIN 1.344: preferred, colored
Changes since revision 1.343: +3 -3 lines
Sync with HEAD

Revision 1.344: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:05:02 2020 UTC (6 years, 7 months ago) by maxv
Branches: MAIN
CVS tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Diff to: previous 1.343: preferred, colored
Changes since revision 1.343: +3 -3 lines
constify

Revision 1.341.6.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 14:08:12 2020 UTC (6 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.341.6.1: preferred, colored; branchpoint 1.341: preferred, colored
Changes since revision 1.341.6.1: +28 -10 lines
Merge changes from current as of 20200406

Revision 1.342.4.1: download - view: text, markup, annotated - select for diffs
Thu Apr 2 19:15:35 2020 UTC (6 years, 7 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-1-RELEASE
Diff to: previous 1.342: preferred, colored
Changes since revision 1.342: +28 -10 lines
Pull up following revision(s) (requested by mlelstv in ticket #814):

	sys/dev/scsipi/cd.c: revision 1.343
	sys/kern/subr_disk.c: revision 1.130

Avoid division by zero if label isn't valid.

Allow open of RAWPART even when no medium is loaded.
Keep errors silent if no medium is loaded.

Fixes PR kern/55104

Revision 1.340.6.2: download - view: text, markup, annotated - select for diffs
Sun Mar 29 12:10:37 2020 UTC (6 years, 7 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-2-RELEASE
Diff to: previous 1.340.6.1: preferred, colored; branchpoint 1.340: preferred, colored
Changes since revision 1.340.6.1: +28 -10 lines
Pull up following revision(s) (requested by mlelstv in ticket #1527):

	sys/dev/scsipi/cd.c: revision 1.343
	sys/kern/subr_disk.c: revision 1.130

Avoid division by zero if label isn't valid.
Allow open of RAWPART even when no medium is loaded.
Keep errors silent if no medium is loaded.
Fixes PR kern/55104

Revision 1.343: download - view: text, markup, annotated - select for diffs
Fri Mar 27 11:15:33 2020 UTC (6 years, 7 months ago) by mlelstv
Branches: MAIN
CVS tags: phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Diff to: previous 1.342: preferred, colored
Changes since revision 1.342: +28 -10 lines
Allow open of RAWPART even when no medium is loaded.
Keep errors silent if no medium is loaded.

Fixes PR kern/55104

Revision 1.341.6.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:07:32 2019 UTC (7 years, 5 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.341: preferred, colored
Changes since revision 1.341: +5 -5 lines
Sync with HEAD

Revision 1.341.4.1: download - view: text, markup, annotated - select for diffs
Thu Sep 6 06:56:04 2018 UTC (8 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.341: preferred, colored; next MAIN 1.342: preferred, colored
Changes since revision 1.341: +5 -5 lines
Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.342: download - view: text, markup, annotated - select for diffs
Mon Sep 3 16:29:33 2018 UTC (8 years, 2 months ago) by riastradh
Branches: MAIN
CVS tags: phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2, is-mlppp-base, is-mlppp, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: netbsd-9
Diff to: previous 1.341: preferred, colored
Changes since revision 1.341: +5 -5 lines
Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)

Revision 1.309.2.4: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:37:32 2017 UTC (8 years, 11 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.309.2.3: preferred, colored; branchpoint 1.309: preferred, colored; next MAIN 1.310: preferred, colored
Changes since revision 1.309.2.3: +539 -867 lines
update from HEAD

Revision 1.325.2.6: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:52:26 2017 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.325.2.5: preferred, colored; branchpoint 1.325: preferred, colored; next MAIN 1.326: preferred, colored
Changes since revision 1.325.2.5: +9 -5 lines
Sync with HEAD

Revision 1.340.6.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 18:18:55 2017 UTC (9 years, 4 months ago) by snj
Branches: netbsd-8
CVS tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.340: preferred, colored
Changes since revision 1.340: +3 -3 lines
Pull up following revision(s) (requested by mlelstv in ticket #53):
	sys/dev/scsipi/atapiconf.c: revision 1.91
	sys/dev/scsipi/cd.c: revision 1.341
	sys/dev/scsipi/scsi_base.c: revision 1.92
	sys/dev/scsipi/scsiconf.c: revision 1.280
	sys/dev/scsipi/scsipi_base.c: revisions 1.176, 1.177
	sys/dev/scsipi/sd.c: revision 1.325
	sys/dev/scsipi/ss.c: revision 1.89
	sys/dev/scsipi/st.c: revision 1.231
The atapibus detach path did hold the channel mutex while calling into autoconf,
which would trigger a panic when unplugging a USB ATAPI CDROM.
Align detach code for scsibus and atapibus to fix this.
Also avoid races when detaching devices by replacing callout_stop with
callout_halt.
--
pass config_detach error to caller.

Revision 1.341: download - view: text, markup, annotated - select for diffs
Sat Jun 17 22:35:50 2017 UTC (9 years, 5 months ago) by mlelstv
Branches: MAIN
CVS tags: tls-maxphys-base-20171202, phil-wifi-base, pgoyette-compat-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Branch point for: phil-wifi, pgoyette-compat
Diff to: previous 1.340: preferred, colored
Changes since revision 1.340: +1 -1 lines
The atapibus detach path did hold the channel mutex while calling into autoconf,
which would trigger a panic when unplugging a USB ATAPI CDROM.

Align detach code for scsibus and atapibus to fix this.

Also avoid races when detaching devices by replacing callout_stop with
callout_halt.

Revision 1.340.4.2: download - view: text, markup, annotated - select for diffs
Sat Apr 29 11:12:14 2017 UTC (9 years, 6 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.340.4.1: preferred, colored; branchpoint 1.340: preferred, colored; next MAIN 1.341: preferred, colored
Changes since revision 1.340.4.1: +2 -3 lines
Remove more unnecessary #include for sys/localcount.h

Revision 1.340.4.1: download - view: text, markup, annotated - select for diffs
Thu Apr 27 05:36:36 2017 UTC (9 years, 6 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.340: preferred, colored
Changes since revision 1.340: +5 -2 lines
Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita.  There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.

Revision 1.331.2.5: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:23 2017 UTC (9 years, 6 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.331.2.4: preferred, colored; branchpoint 1.331: preferred, colored; next MAIN 1.332: preferred, colored
Changes since revision 1.331.2.4: +8 -4 lines
Sync with HEAD

Revision 1.339.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:53:52 2017 UTC (9 years, 6 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.339: preferred, colored; next MAIN 1.340: preferred, colored
Changes since revision 1.339: +8 -4 lines
Sync with HEAD

Revision 1.340: download - view: text, markup, annotated - select for diffs
Sat Apr 8 13:50:23 2017 UTC (9 years, 7 months ago) by mlelstv
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-20170426, netbsd-8-base, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: prg-localcount2, netbsd-8
Diff to: previous 1.339: preferred, colored
Changes since revision 1.339: +6 -2 lines
ignore a failed scspi_prevent when accessing the RAW_PART as before.

Revision 1.325.2.5: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:46 2017 UTC (9 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.325.2.4: preferred, colored; branchpoint 1.325: preferred, colored
Changes since revision 1.325.2.4: +514 -831 lines
Sync with HEAD

Revision 1.331.2.4: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:41 2017 UTC (9 years, 10 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.331.2.3: preferred, colored; branchpoint 1.331: preferred, colored
Changes since revision 1.331.2.3: +523 -834 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.339: download - view: text, markup, annotated - select for diffs
Thu Jan 5 16:35:33 2017 UTC (9 years, 10 months ago) by mlelstv
Branches: MAIN
CVS tags: pgoyette-localcount-20170320, pgoyette-localcount-20170107, nick-nhusb-base-20170204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.338: preferred, colored
Changes since revision 1.338: +7 -7 lines
Fix memory leak.

Found by maxv@

Revision 1.338: download - view: text, markup, annotated - select for diffs
Wed Dec 21 21:28:30 2016 UTC (9 years, 10 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.337: preferred, colored
Changes since revision 1.337: +3 -3 lines
really keep request queued after resource shortage

Revision 1.337: download - view: text, markup, annotated - select for diffs
Wed Dec 21 00:56:30 2016 UTC (9 years, 10 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.336: preferred, colored
Changes since revision 1.336: +3 -4 lines
cdrestart takes a softc parameter, not a periph.

Revision 1.336: download - view: text, markup, annotated - select for diffs
Fri Dec 16 14:58:53 2016 UTC (9 years, 11 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.335: preferred, colored
Changes since revision 1.335: +3 -2 lines
add comment about "missing" dk_start.

Revision 1.335: download - view: text, markup, annotated - select for diffs
Sat Dec 10 21:17:12 2016 UTC (9 years, 11 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.334: preferred, colored
Changes since revision 1.334: +3 -3 lines
appease gcc.

Revision 1.334: download - view: text, markup, annotated - select for diffs
Sat Dec 10 10:26:38 2016 UTC (9 years, 11 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.333: preferred, colored
Changes since revision 1.333: +509 -826 lines
Refactored sd and cd to use common disk subroutines.

Revision 1.325.2.4: download - view: text, markup, annotated - select for diffs
Mon Dec 5 10:55:17 2016 UTC (9 years, 11 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.325.2.3: preferred, colored; branchpoint 1.325: preferred, colored
Changes since revision 1.325.2.3: +29 -23 lines
Sync with HEAD

Revision 1.333: download - view: text, markup, annotated - select for diffs
Sun Nov 20 15:37:19 2016 UTC (9 years, 11 months ago) by mlelstv
Branches: MAIN
CVS tags: nick-nhusb-base-20161204
Diff to: previous 1.332: preferred, colored
Changes since revision 1.332: +27 -21 lines
Make scsipi framework MPSAFE.

Data structures are now protected by a per-adapter mutex at IPL_BIO
that is created by the scsibus or atapibus instance when the adapter
is configured.
The enable reference counter and the channel freeze counter which are
currently used by HBA code before the adapter is configured, are made
atomic.
The target drivers are now all tagged as D_MPSAFE.

Almost all HBA drivers still require the kernel lock to present,
so all callbacks into HBA code are still protected by kernel lock
unless the driver is tagged as SCSIPI_ADAPT_MPSAFE.

TODO: refactor sd and cd to use dksubr.

Revision 1.332: download - view: text, markup, annotated - select for diffs
Sun Nov 20 02:38:24 2016 UTC (9 years, 11 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.331: preferred, colored
Changes since revision 1.331: +4 -4 lines
Avoid calling bufq_free() from critical code sections.

Revision 1.331.2.3: download - view: text, markup, annotated - select for diffs
Tue Jul 26 05:54:39 2016 UTC (10 years, 3 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.331.2.2: preferred, colored; branchpoint 1.331: preferred, colored
Changes since revision 1.331.2.2: +4 -4 lines
Rename LOCALCOUNT_INITIALIZER to DEVSW_MODULE_INIT.  This better describes
what we're doing, and why.

Revision 1.331.2.2: download - view: text, markup, annotated - select for diffs
Tue Jul 19 06:26:59 2016 UTC (10 years, 4 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.331.2.1: preferred, colored; branchpoint 1.331: preferred, colored
Changes since revision 1.331.2.1: +4 -12 lines
Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it.  This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@

Revision 1.331.2.1: download - view: text, markup, annotated - select for diffs
Mon Jul 18 03:49:59 2016 UTC (10 years, 4 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.331: preferred, colored
Changes since revision 1.331: +13 -2 lines
Rump drivers are always installed via devsw_attach() so we need to
always allocate a 'struct localcount' for these drivers whenever they
are built as modules.

Revision 1.325.2.3: download - view: text, markup, annotated - select for diffs
Sun May 29 08:44:31 2016 UTC (10 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.325.2.2: preferred, colored; branchpoint 1.325: preferred, colored
Changes since revision 1.325.2.2: +7 -7 lines
Sync with HEAD

Revision 1.331: download - view: text, markup, annotated - select for diffs
Sun May 15 15:37:38 2016 UTC (10 years, 6 months ago) by reinoud
Branches: MAIN
CVS tags: pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, localcount-20160914
Branch point for: pgoyette-localcount
Diff to: previous 1.330: preferred, colored
Changes since revision 1.330: +7 -7 lines
Use _align(2) workaround for PR kern/51141. This fixes odd CD length
reporting.

Revision 1.325.2.2: download - view: text, markup, annotated - select for diffs
Sat Jun 6 14:40:13 2015 UTC (11 years, 5 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.325.2.1: preferred, colored; branchpoint 1.325: preferred, colored
Changes since revision 1.325.2.1: +14 -11 lines
Sync with HEAD

Revision 1.330: download - view: text, markup, annotated - select for diffs
Sun Apr 26 15:15:20 2015 UTC (11 years, 6 months ago) by mlelstv
Branches: MAIN
CVS tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606
Diff to: previous 1.329: preferred, colored
Changes since revision 1.329: +6 -3 lines
Use C99-style initializers for struct dkdriver.

Revision 1.329: download - view: text, markup, annotated - select for diffs
Mon Apr 13 16:33:25 2015 UTC (11 years, 7 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.328: preferred, colored
Changes since revision 1.328: +3 -3 lines
Convert sys/dev to use <sys/rndsource.h>.

Revision 1.325.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 6 15:18:13 2015 UTC (11 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.325: preferred, colored
Changes since revision 1.325: +5 -29 lines
Sync with HEAD

Revision 1.328: download - view: text, markup, annotated - select for diffs
Fri Jan 2 19:42:07 2015 UTC (11 years, 10 months ago) by christos
Branches: MAIN
CVS tags: nick-nhusb-base-20150406
Diff to: previous 1.327: preferred, colored
Changes since revision 1.327: +4 -4 lines
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.

Revision 1.327: download - view: text, markup, annotated - select for diffs
Wed Dec 31 19:52:06 2014 UTC (11 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.326: preferred, colored
Changes since revision 1.326: +3 -26 lines
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.

Revision 1.326: download - view: text, markup, annotated - select for diffs
Wed Dec 31 19:37:35 2014 UTC (11 years, 10 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.325: preferred, colored
Changes since revision 1.325: +2 -3 lines
forgot this one. disk_set_info includes the functionality of disk_blocksize.

Revision 1.325: download - view: text, markup, annotated - select for diffs
Sat Oct 18 08:33:28 2014 UTC (12 years, 1 month ago) by snj
Branches: MAIN
CVS tags: nick-nhusb-base
Branch point for: nick-nhusb
Diff to: previous 1.324: preferred, colored
Changes since revision 1.324: +3 -3 lines
src is too big these days to tolerate superfluous apostrophes.  It's
"its", people!

Revision 1.324: download - view: text, markup, annotated - select for diffs
Fri Oct 3 00:00:11 2014 UTC (12 years, 1 month ago) by justin
Branches: MAIN
Diff to: previous 1.323: preferred, colored
Changes since revision 1.323: +4 -4 lines
Use uint32_t for blocksize as per other uses and to fix warnings

Revision 1.309.2.3: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:03:50 2014 UTC (12 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.309.2.2: preferred, colored; branchpoint 1.309: preferred, colored
Changes since revision 1.309.2.2: +66 -39 lines
Rebase to HEAD as of a few days ago.

Revision 1.323: download - view: text, markup, annotated - select for diffs
Sun Aug 10 16:44:36 2014 UTC (12 years, 3 months ago) by tls
Branches: MAIN
CVS tags: tls-maxphys-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Diff to: previous 1.322: preferred, colored
Changes since revision 1.322: +3 -3 lines
Merge tls-earlyentropy branch into HEAD.

Revision 1.318.2.2: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:54:57 2014 UTC (12 years, 3 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.318.2.1: preferred, colored; branchpoint 1.318: preferred, colored; next MAIN 1.319: preferred, colored
Changes since revision 1.318.2.1: +13 -3 lines
Rebase.

Revision 1.322: download - view: text, markup, annotated - select for diffs
Fri Jul 25 08:10:38 2014 UTC (12 years, 3 months ago) by dholland
Branches: MAIN
CVS tags: tls-earlyentropy-base
Diff to: previous 1.321: preferred, colored
Changes since revision 1.321: +3 -2 lines
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.

Revision 1.321: download - view: text, markup, annotated - select for diffs
Fri Jul 25 08:02:20 2014 UTC (12 years, 3 months ago) by dholland
Branches: MAIN
Diff to: previous 1.320: preferred, colored
Changes since revision 1.320: +3 -2 lines
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.

Revision 1.320: download - view: text, markup, annotated - select for diffs
Sat Jul 12 12:13:01 2014 UTC (12 years, 4 months ago) by hannken
Branches: MAIN
Diff to: previous 1.319: preferred, colored
Changes since revision 1.319: +5 -2 lines
Prevent detaching an open device unless forced.

Revision 1.303.4.3: download - view: text, markup, annotated - select for diffs
Thu May 22 11:40:35 2014 UTC (12 years, 5 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.303.4.2: preferred, colored; branchpoint 1.303: preferred, colored; next MAIN 1.304: preferred, colored
Changes since revision 1.303.4.2: +72 -68 lines
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")

Revision 1.311.2.2: download - view: text, markup, annotated - select for diffs
Sun May 18 17:45:46 2014 UTC (12 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.311.2.1: preferred, colored; next MAIN 1.312: preferred, colored
Changes since revision 1.311.2.1: +43 -17 lines
sync with head

Revision 1.319: download - view: text, markup, annotated - select for diffs
Fri Apr 18 06:23:32 2014 UTC (12 years, 7 months ago) by martin
Branches: MAIN
CVS tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base
Diff to: previous 1.318: preferred, colored
Changes since revision 1.318: +8 -3 lines
Fix PR kern/48550 by aligning the single instance of scsipi_read_cd_cap_data
that we found misaligned in the wild so far properly for the ahcisata
driver. Also point at PR kern/48754 for the real issue.

Revision 1.318.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 7 03:37:33 2014 UTC (12 years, 7 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.318: preferred, colored
Changes since revision 1.318: +3 -3 lines
Be a little more clear and consistent about harvesting entropy from devices:

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
   RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

5) Make entropy harvesting from environmental sensors a little more generic
   and remove it from individual sensor drivers.

6) Remove individual open-coded delta-estimators for values from a few
   places in the tree (uvm, environmental drivers).

7) 0 -> RND_FLAG_DEFAULT, actually gather entropy from various drivers
   that had stubbed out code, other minor cleanups.

Revision 1.318: download - view: text, markup, annotated - select for diffs
Wed Mar 19 15:48:23 2014 UTC (12 years, 8 months ago) by martin
Branches: MAIN
CVS tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
Branch point for: tls-earlyentropy
Diff to: previous 1.317: preferred, colored
Changes since revision 1.317: +13 -6 lines
PR kern/48550: additional initialization and sanity checking on the reported
blocksize of the medium.

Revision 1.317: download - view: text, markup, annotated - select for diffs
Sun Mar 16 05:20:29 2014 UTC (12 years, 8 months ago) by dholland
Branches: MAIN
CVS tags: riastradh-drm2-base3
Diff to: previous 1.316: preferred, colored
Changes since revision 1.316: +20 -5 lines
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.

Revision 1.316: download - view: text, markup, annotated - select for diffs
Fri Oct 25 11:35:55 2013 UTC (13 years ago) by martin
Branches: MAIN
Diff to: previous 1.315: preferred, colored
Changes since revision 1.315: +3 -3 lines
Turn a few __unused into __diagused

Revision 1.315: download - view: text, markup, annotated - select for diffs
Sat Oct 19 19:10:12 2013 UTC (13 years, 1 month ago) by martin
Branches: MAIN
Diff to: previous 1.314: preferred, colored
Changes since revision 1.314: +3 -3 lines
Mark a potentially unused variable

Revision 1.314: download - view: text, markup, annotated - select for diffs
Sat Sep 28 09:00:26 2013 UTC (13 years, 1 month ago) by skrll
Branches: MAIN
Diff to: previous 1.313: preferred, colored
Changes since revision 1.313: +4 -3 lines
Don't return EPASSTHROUGH when succeeding in ODIOCGDINFO or ODIOCGDEFLABEL

Revision 1.313: download - view: text, markup, annotated - select for diffs
Thu Sep 12 12:26:13 2013 UTC (13 years, 2 months ago) by martin
Branches: MAIN
Diff to: previous 1.312: preferred, colored
Changes since revision 1.312: +5 -7 lines
Remove unused variables

Revision 1.311.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 28 23:59:26 2013 UTC (13 years, 2 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.311: preferred, colored
Changes since revision 1.311: +22 -26 lines
sync with head

Revision 1.312: download - view: text, markup, annotated - select for diffs
Tue Jul 2 15:05:53 2013 UTC (13 years, 4 months ago) by reinoud
Branches: MAIN
CVS tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Diff to: previous 1.311: preferred, colored
Changes since revision 1.311: +22 -26 lines
Small patch to clarify last_lba and now using size confusingly. No functional
change.

Revision 1.309.2.2: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:20:21 2013 UTC (13 years, 4 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.309.2.1: preferred, colored; branchpoint 1.309: preferred, colored
Changes since revision 1.309.2.1: +12 -30 lines
resync from head

Revision 1.311: download - view: text, markup, annotated - select for diffs
Wed May 29 00:47:49 2013 UTC (13 years, 5 months ago) by christos
Branches: MAIN
Branch point for: rmind-smpnet
Diff to: previous 1.310: preferred, colored
Changes since revision 1.310: +10 -29 lines
phase 1 of disk geometry cleanup:
	- centralize the geometry -> plist code so that we don't have
	  n useless copies of it.

Revision 1.310: download - view: text, markup, annotated - select for diffs
Fri Mar 15 16:16:12 2013 UTC (13 years, 8 months ago) by martin
Branches: MAIN
CVS tags: khorben-n900, agc-symver-base, agc-symver
Diff to: previous 1.309: preferred, colored
Changes since revision 1.309: +4 -3 lines
Prompted by PR kern/47646, zero the value buffer before running the
GET_CONFIGURATION command and check for an unexpectedly large feature
length answer afterwards.

Revision 1.309.2.1: download - view: text, markup, annotated - select for diffs
Wed Sep 12 06:15:33 2012 UTC (14 years, 2 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.309: preferred, colored
Changes since revision 1.309: +10 -2 lines
Initial snapshot of work to eliminate 64K MAXPHYS.  Basically works for
physio (I/O to raw devices); needs more doing to get it going with the
filesystems, but it shouldn't damage data.

All work's been done on amd64 so far.  Not hard to add support to other
ports.  If others want to pitch in, one very helpful thing would be to
sort out when and how IDE disks can do 128K or larger transfers, and
adjust the various PCI IDE (or at least ahcisata) drivers and wd.c
accordingly -- it would make testing much easier.  Another very helpful
thing would be to implement a smart minphys() for RAIDframe along the
lines detailed in the MAXPHYS-NOTES file.

Revision 1.304.2.4: download - view: text, markup, annotated - select for diffs
Sat Jun 2 11:09:28 2012 UTC (14 years, 5 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.304.2.3: preferred, colored; branchpoint 1.304: preferred, colored; next MAIN 1.305: preferred, colored
Changes since revision 1.304.2.3: +27 -11 lines
sync to latest -current.

Revision 1.303.4.2: download - view: text, markup, annotated - select for diffs
Wed May 23 10:08:05 2012 UTC (14 years, 5 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.303.4.1: preferred, colored; branchpoint 1.303: preferred, colored
Changes since revision 1.303.4.1: +30 -14 lines
sync with head.

Revision 1.309: download - view: text, markup, annotated - select for diffs
Sun May 6 17:23:10 2012 UTC (14 years, 6 months ago) by martin
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Diff to: previous 1.308: preferred, colored
Changes since revision 1.308: +20 -3 lines
When ejecting a medium, invalidate the in core disklabel - it is not
meaningfull anymore. This makes the following cdclose() use silent
mode and finally fixes PR kern/43785.

Revision 1.308: download - view: text, markup, annotated - select for diffs
Sun May 6 16:42:19 2012 UTC (14 years, 6 months ago) by martin
Branches: MAIN
Diff to: previous 1.307: preferred, colored
Changes since revision 1.307: +9 -10 lines
In cdopen: make the test for media presence always silent. In all cases
requiring a message, we will most likely get that from the spinup attempt
anyway.
This avoids the spurious "Check Condition on CDB, Not Ready, Medium Not
Present, Tray Closed" messages at boot/shutdown time.

Revision 1.304.2.3: download - view: text, markup, annotated - select for diffs
Sun Apr 29 23:04:59 2012 UTC (14 years, 6 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.304.2.2: preferred, colored; branchpoint 1.304: preferred, colored
Changes since revision 1.304.2.2: +5 -5 lines
sync to latest -current.

Revision 1.305.2.1: download - view: text, markup, annotated - select for diffs
Mon Apr 23 16:28:30 2012 UTC (14 years, 6 months ago) by riz
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Diff to: previous 1.305: preferred, colored; next MAIN 1.306: preferred, colored
Changes since revision 1.305: +5 -5 lines
Pull up following revision(s) (requested by bouyer in ticket #192):
	sys/dev/scsipi/cd.c: revision 1.307
	sys/dev/scsipi/scsiconf.c: revision 1.266
	sys/dev/scsipi/sd.c: revision 1.298
	sys/dev/scsipi/st_scsi.c: revision 1.35
	sys/dev/scsipi/atapiconf.c: revision 1.85
	sys/dev/scsipi/scsipiconf.h: revision 1.120
	sys/dev/usb/umass_scsipi.c: revision 1.44
	sys/dev/scsipi/scsiconf.h: revision 1.57
	sys/dev/scsipi/st_atapi.c: revision 1.29
	sys/dev/scsipi/scsipi_base.c: revision 1.158
	sys/dev/scsipi/st.c: revision 1.221
	sys/dev/scsipi/scsipi_ioctl.c: revision 1.67
Expand struct scsipi_bustype {} in a ABI-backward-compatible way to
pass more informations about the bus:
- bustype_type has 2 different bytes, one holding the existing
  SCSIPI_BUSTYPE_* (scsi, atapi, ata), and one for a per-SCSIPI_BUSTYPE_*
  subtype. Introduce macros to build or extract bustype_type.
- for SCSIPI_BUSTYPE_SCSI, define subtypes for parallel SCSI, Fibre Channel,
  SAS and USB, to specify the transport method. SCSIPI_BUSTYPE_SCSI_PSCSI
  is 0 so that bustype_type value doesn't change for existing code
- for non-SCSIPI_BUSTYPE_SCSI busses there's no defined subtype yet,
  so the bustype_type value doesn't change.
- provide scsi_fc_bustype, scsi_sas_bustype and scsi_usb_bustype
  along with scsi_bustype to be used by bus driver where appropriate
- scsipi_print_xfer_mode(): more existing code under a
  (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_PSCSI) case, as
  sync/wide parameters only make sense for parallel SCSI.
  For (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_FC) and
  (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_SAS), only print
  tagged queing status if enabled. Just be silent for other
  bustypes.
This change is prompted by this problem:
right now, FC (e.g. isp(4)) and SAS (e.g. mfi(4)) don't
  do anything for ADAPTER_REQ_SET_XFER_MODE, and especially never
  call scsipi_async_event(ASYNC_EVENT_XFER_MODE), so sd(4) always
  runs untagged. Doing a scsipi_async_event(ASYNC_EVENT_XFER_MODE) with
  appropriate parameters is enough to enable tagged queuing,
  but then scsipi will print:
  sd0: async, 8-bit transfers, tagged queueing
  which is harmless (async, 8-bit transfers doens't make sense on SAS anyway)
  but will confuse users. With this change scsipi will only print:
  sd0: tagged queueing
  which is correct.
In the long run, knowning the underlying transport in scsipi will
allow better handling of device which are not parallel SCSI.
Another change adding an extra callback to struct scsipi_bustype {}
will come (so that scsipi_print_xfer_mode(), which is SCSI-specific,
can be moved out of scsipi_base, and split into per-subtype callback),
but this will break kernel ABI and so is not suitable for
netbsd-6, so will be commmited later. The above is enough to get
tagged queuing on FC and SAS in netbsd-6.

Revision 1.307: download - view: text, markup, annotated - select for diffs
Thu Apr 19 17:45:20 2012 UTC (14 years, 7 months ago) by bouyer
Branches: MAIN
CVS tags: jmcneill-usbmp-base9
Diff to: previous 1.306: preferred, colored
Changes since revision 1.306: +5 -5 lines
Expand struct scsipi_bustype {} in a ABI-backward-compatible way to
pass more informations about the bus:
- bustype_type has 2 different bytes, one holding the existing
  SCSIPI_BUSTYPE_* (scsi, atapi, ata), and one for a per-SCSIPI_BUSTYPE_*
  subtype. Introduce macros to build or extract bustype_type.
- for SCSIPI_BUSTYPE_SCSI, define subtypes for parallel SCSI, Fibre Channel,
  SAS and USB, to specify the transport method. SCSIPI_BUSTYPE_SCSI_PSCSI
  is 0 so that bustype_type value doesn't change for existing code
- for non-SCSIPI_BUSTYPE_SCSI busses there's no defined subtype yet,
  so the bustype_type value doesn't change.
- provide scsi_fc_bustype, scsi_sas_bustype and scsi_usb_bustype
  along with scsi_bustype to be used by bus driver where appropriate
- scsipi_print_xfer_mode(): more existing code under a
  (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_PSCSI) case, as
  sync/wide parameters only make sense for parallel SCSI.
  For (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_FC) and
  (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_SAS), only print
  tagged queing status if enabled. Just be silent for other
  bustypes.

This change is prompted by this problem:
right now, FC (e.g. isp(4)) and SAS (e.g. mfi(4)) don't
  do anything for ADAPTER_REQ_SET_XFER_MODE, and especially never
  call scsipi_async_event(ASYNC_EVENT_XFER_MODE), so sd(4) always
  runs untagged. Doing a scsipi_async_event(ASYNC_EVENT_XFER_MODE) with
  appropriate parameters is enough to enable tagged queuing,
  but then scsipi will print:
  sd0: async, 8-bit transfers, tagged queueing
  which is harmless (async, 8-bit transfers doens't make sense on SAS anyway)
  but will confuse users. With this change scsipi will only print:
  sd0: tagged queueing
  which is correct.

In the long run, knowning the underlying transport in scsipi will
allow better handling of device which are not parallel SCSI.

Another change adding an extra callback to struct scsipi_bustype {}
will come (so that scsipi_print_xfer_mode(), which is SCSI-specific,
can be moved out of scsipi_base, and split into per-subtype callback),
but this will break kernel ABI and so is not suitable for
netbsd-6, so will be commmited later. The above is enough to get
tagged queuing on FC and SAS in netbsd-6.

Revision 1.303.4.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:08:02 2012 UTC (14 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.303: preferred, colored
Changes since revision 1.303: +7 -17 lines
sync with head

Revision 1.304.2.2: download - view: text, markup, annotated - select for diffs
Sun Mar 4 00:46:26 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.304.2.1: preferred, colored; branchpoint 1.304: preferred, colored
Changes since revision 1.304.2.1: +5 -5 lines
sync to latest -current.

Revision 1.306: download - view: text, markup, annotated - select for diffs
Sat Feb 25 10:17:14 2012 UTC (14 years, 8 months ago) by shattered
Branches: MAIN
CVS tags: yamt-pagecache-base4, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4
Diff to: previous 1.305: preferred, colored
Changes since revision 1.305: +5 -5 lines
Fix typos in comments.

OK by wiz@

Revision 1.304.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:34:59 2012 UTC (14 years, 9 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.304: preferred, colored
Changes since revision 1.304: +2 -12 lines
merge to -current.

Revision 1.305: download - view: text, markup, annotated - select for diffs
Thu Feb 2 19:43:06 2012 UTC (14 years, 9 months ago) by tls
Branches: MAIN
CVS tags: netbsd-6-base, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Branch point for: netbsd-6
Diff to: previous 1.304: preferred, colored
Changes since revision 1.304: +2 -12 lines
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.

Revision 1.304: download - view: text, markup, annotated - select for diffs
Fri Nov 25 12:39:55 2011 UTC (14 years, 11 months ago) by joerg
Branches: MAIN
CVS tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Diff to: previous 1.303: preferred, colored
Changes since revision 1.303: +4 -4 lines
Replace memset with incorrect size argument with M_ZERO.

Revision 1.302.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:08:36 2011 UTC (15 years, 5 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.302: preferred, colored; next MAIN 1.303: preferred, colored
Changes since revision 1.302: +3 -3 lines
Sync with HEAD.

Revision 1.298.2.2: download - view: text, markup, annotated - select for diffs
Tue May 31 03:04:55 2011 UTC (15 years, 5 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.298.2.1: preferred, colored; next MAIN 1.299: preferred, colored
Changes since revision 1.298.2.1: +3 -3 lines
sync with head

Revision 1.303: download - view: text, markup, annotated - select for diffs
Fri May 20 09:23:37 2011 UTC (15 years, 6 months ago) by reinoud
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache
Diff to: previous 1.302: preferred, colored
Changes since revision 1.302: +3 -3 lines
Fix size reporting for DVD+R/DL and BluRay's; the value was trunced due to a
32 bit trunc due to a lacking type cast. The number of sectors for such media
can be more than 1<<32-1.

Revision 1.283.4.3: download - view: text, markup, annotated - select for diffs
Sat Nov 20 17:41:26 2010 UTC (15 years, 11 months ago) by riz
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.283.4.2: preferred, colored; branchpoint 1.283: preferred, colored; next MAIN 1.284: preferred, colored
Changes since revision 1.283.4.2: +3 -3 lines
Pull up following revision(s) (requested by hubertf in ticket #1386):
	sys/dev/raidframe/rf_netbsdkintf.c: revision 1.258
	sys/dev/pad/pad.c: revision 1.11
	sys/dev/scsipi/cd.c: revision 1.288
	sys/dev/isa/pcppi.c: revision 1.33
	sys/kern/subr_autoconf.c: revision 1.169
'boot -z' bogons

Revision 1.273.4.6: download - view: text, markup, annotated - select for diffs
Wed Aug 11 22:54:10 2010 UTC (16 years, 3 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.273.4.5: preferred, colored; branchpoint 1.273: preferred, colored; next MAIN 1.274: preferred, colored
Changes since revision 1.273.4.5: +44 -11 lines
sync with head.

Revision 1.298.2.1: download - view: text, markup, annotated - select for diffs
Sun May 30 05:17:42 2010 UTC (16 years, 5 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.298: preferred, colored
Changes since revision 1.298: +43 -11 lines
sync with head

Revision 1.297.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:43:48 2010 UTC (16 years, 6 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.297: preferred, colored; next MAIN 1.298: preferred, colored
Changes since revision 1.297: +44 -11 lines
Sync with HEAD.

Revision 1.302: download - view: text, markup, annotated - select for diffs
Sun Apr 4 21:36:22 2010 UTC (16 years, 7 months ago) by martin
Branches: MAIN
CVS tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Diff to: previous 1.301: preferred, colored
Changes since revision 1.301: +20 -9 lines
cd_size: if we fake a size (and I realy have no idea why this would be a
good idea), at least set up all values to the fake values, as the caller
expects.
Should fix PR kern/39904, though if noone can find out why the fake value
would be needed, we should change it to just return 0 as suggested in the PR.

Revision 1.301: download - view: text, markup, annotated - select for diffs
Tue Mar 23 18:56:18 2010 UTC (16 years, 7 months ago) by martin
Branches: MAIN
Diff to: previous 1.300: preferred, colored
Changes since revision 1.300: +8 -3 lines
If we find a device in non-2048 byte/block mode and manage to switch
it over, we need to adjust the capacity - so just read it again.

Revision 1.300: download - view: text, markup, annotated - select for diffs
Tue Mar 23 12:42:55 2010 UTC (16 years, 7 months ago) by martin
Branches: MAIN
Diff to: previous 1.299: preferred, colored
Changes since revision 1.299: +10 -4 lines
Make cdclose() silent, if we only have the raw partition open (e.g. when
probing for media and not finding any)

Revision 1.299: download - view: text, markup, annotated - select for diffs
Mon Mar 22 16:49:41 2010 UTC (16 years, 7 months ago) by martin
Branches: MAIN
Diff to: previous 1.298: preferred, colored
Changes since revision 1.298: +12 -2 lines
Add a DIOCTUR (test unit ready) ioctl, to allow userland to easily
(and silently) check for presence of media. While this would be easy
to implement via SCIOCCOMMAND, our kernel has quirks for this
command, which otherwise would not be readily available to userland
applications.

Revision 1.273.4.5: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:04:03 2010 UTC (16 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.273.4.4: preferred, colored; branchpoint 1.273: preferred, colored
Changes since revision 1.273.4.4: +48 -78 lines
sync with head

Revision 1.298: download - view: text, markup, annotated - select for diffs
Thu Mar 11 04:00:36 2010 UTC (16 years, 8 months ago) by mrg
Branches: MAIN
Branch point for: rmind-uvmplock
Diff to: previous 1.297: preferred, colored
Changes since revision 1.297: +3 -2 lines
various aprint_* fixes.

Revision 1.297: download - view: text, markup, annotated - select for diffs
Wed Jan 6 20:16:57 2010 UTC (16 years, 10 months ago) by martin
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip
Diff to: previous 1.296: preferred, colored
Changes since revision 1.296: +4 -2 lines
Some usb devices come with an internal emulated umass CD drive (containing
windows drivers). I have such a device that has 0 features - avoid wrappig
features_len to a very big unsiged 32bit number in this case.

Revision 1.296: download - view: text, markup, annotated - select for diffs
Sun Dec 6 22:48:17 2009 UTC (16 years, 11 months ago) by dyoung
Branches: MAIN
CVS tags: matt-premerge-20091211
Diff to: previous 1.295: preferred, colored
Changes since revision 1.295: +3 -23 lines
Delete do-nothing device-activation hooks.

Revision 1.295: download - view: text, markup, annotated - select for diffs
Wed Oct 21 21:12:05 2009 UTC (17 years ago) by rmind
Branches: MAIN
CVS tags: jym-xensuspend-nbase
Diff to: previous 1.294: preferred, colored
Changes since revision 1.294: +45 -57 lines
Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.

Revision 1.273.4.4: download - view: text, markup, annotated - select for diffs
Wed Aug 19 18:47:19 2009 UTC (17 years, 3 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.273.4.3: preferred, colored; branchpoint 1.273: preferred, colored
Changes since revision 1.273.4.3: +3 -3 lines
sync with head.

Revision 1.294: download - view: text, markup, annotated - select for diffs
Sun Jul 26 15:29:00 2009 UTC (17 years, 3 months ago) by reinoud
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Diff to: previous 1.293: preferred, colored
Changes since revision 1.293: +3 -3 lines
Significantly bump time for SCSI track/disc closure. DVD-RW when used
sequentially can significantly take more time.

Revision 1.287.2.2: download - view: text, markup, annotated - select for diffs
Thu Jul 23 23:32:20 2009 UTC (17 years, 3 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.287.2.1: preferred, colored; branchpoint 1.287: preferred, colored; next MAIN 1.288: preferred, colored
Changes since revision 1.287.2.1: +6 -2 lines
Sync with HEAD.

Revision 1.273.4.3: download - view: text, markup, annotated - select for diffs
Sat Jun 20 07:20:29 2009 UTC (17 years, 5 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.273.4.2: preferred, colored; branchpoint 1.273: preferred, colored
Changes since revision 1.273.4.2: +6 -2 lines
sync with head

Revision 1.293: download - view: text, markup, annotated - select for diffs
Fri Jun 5 21:52:32 2009 UTC (17 years, 5 months ago) by haad
Branches: MAIN
CVS tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Diff to: previous 1.292: preferred, colored
Changes since revision 1.292: +6 -2 lines
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@.

Revision 1.287.2.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:21:22 2009 UTC (17 years, 6 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.287: preferred, colored
Changes since revision 1.287: +41 -18 lines
Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.273.4.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:13:17 2009 UTC (17 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.273.4.1: preferred, colored; branchpoint 1.273: preferred, colored
Changes since revision 1.273.4.1: +61 -33 lines
sync with head.

Revision 1.283.2.3: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:36:32 2009 UTC (17 years, 6 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.283.2.2: preferred, colored; branchpoint 1.283: preferred, colored; next MAIN 1.284: preferred, colored
Changes since revision 1.283.2.2: +41 -18 lines
Sync with HEAD.

Revision 1.283.4.2: download - view: text, markup, annotated - select for diffs
Wed Apr 8 23:02:15 2009 UTC (17 years, 7 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Diff to: previous 1.283.4.1: preferred, colored; branchpoint 1.283: preferred, colored
Changes since revision 1.283.4.1: +29 -5 lines
Pull up following revision(s) (requested by reinoud in ticket #633):
	sys/dev/scsipi/cd.c: revision 1.291
	sys/dev/scsipi/scsipi_cd.h: revision 1.21
Implement MMC_TRACKINFO_DATA and MMC_TRACKINFO_AUDIO detection for cdrom and
dvdrom devices. These two compatibility codes were forgotten when those were
introduced.

Revision 1.292: download - view: text, markup, annotated - select for diffs
Tue Apr 7 18:35:17 2009 UTC (17 years, 7 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Diff to: previous 1.291: preferred, colored
Changes since revision 1.291: +4 -10 lines
Detach atapibus(4), scsibus(4), cd(4), and sd(4) during shutdown.
Destroy sd->sc_callout in sddetach().  Delete some dead code in
cddetach().

Revision 1.291: download - view: text, markup, annotated - select for diffs
Wed Apr 1 12:19:04 2009 UTC (17 years, 7 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.290: preferred, colored
Changes since revision 1.290: +29 -5 lines
Implement MMC_TRACKINFO_DATA and MMC_TRACKINFO_AUDIO detection for cdrom and
dvdrom devices. These two compatibility codes were forgotten when those were
introduced.

Revision 1.283.4.1: download - view: text, markup, annotated - select for diffs
Tue Mar 24 20:16:58 2009 UTC (17 years, 7 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.283: preferred, colored
Changes since revision 1.283: +7 -2 lines
Pull up following revision(s) (requested by reinoud in ticket #586):
	sys/dev/scsipi/cd.c: revision 1.289
Fix long standing problem with CD/DVD writing with `dd'. If done this way the
device will remain in a wait-for-more-stuff-to-be-written state delaying other
SCSI calls, esp. some read-size or read-layout calls, until its told there is
no more comming.
To fix this, on last close explicitly flush the caches releasing the device
from this mode and allowing other SCSI commands to reach it.
This fixes PR 40528

Revision 1.290: download - view: text, markup, annotated - select for diffs
Wed Mar 18 16:00:20 2009 UTC (17 years, 8 months ago) by cegger
Branches: MAIN
Diff to: previous 1.289: preferred, colored
Changes since revision 1.289: +6 -6 lines
bzero -> memset

Revision 1.289: download - view: text, markup, annotated - select for diffs
Tue Mar 17 21:25:47 2009 UTC (17 years, 8 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.288: preferred, colored
Changes since revision 1.288: +7 -2 lines
Fix long standing problem with CD/DVD writing with `dd'. If done this way the
device will remain in a wait-for-more-stuff-to-be-written state delaying other
SCSI calls, esp. some read-size or read-layout calls, until its told there is
no more comming.

To fix this, on last close explicitly flush the caches releasing the device
from this mode and allowing other SCSI commands to reach it.

This fixes PR 40528

Revision 1.288: download - view: text, markup, annotated - select for diffs
Sat Mar 14 11:08:29 2009 UTC (17 years, 8 months ago) by ad
Branches: MAIN
Diff to: previous 1.287: preferred, colored
Changes since revision 1.287: +3 -3 lines
'boot -z' bogons

Revision 1.283.2.2: download - view: text, markup, annotated - select for diffs
Tue Mar 3 18:31:52 2009 UTC (17 years, 8 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.283.2.1: preferred, colored; branchpoint 1.283: preferred, colored
Changes since revision 1.283.2.1: +3 -3 lines
Sync with HEAD.

Revision 1.287: download - view: text, markup, annotated - select for diffs
Wed Jan 21 17:16:12 2009 UTC (17 years, 9 months ago) by cegger
Branches: MAIN
CVS tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Diff to: previous 1.286: preferred, colored
Changes since revision 1.286: +3 -3 lines
buildfix: re-adapt to major()/minor() returning a 32bit value.

Revision 1.283.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 19 13:19:03 2009 UTC (17 years, 10 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.283: preferred, colored
Changes since revision 1.283: +21 -14 lines
Sync with HEAD.

Revision 1.272.6.7: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:29:08 2009 UTC (17 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.272.6.6: preferred, colored; branchpoint 1.272: preferred, colored; next MAIN 1.273: preferred, colored
Changes since revision 1.272.6.6: +19 -12 lines
Sync with HEAD.

Revision 1.286: download - view: text, markup, annotated - select for diffs
Tue Jan 13 13:35:54 2009 UTC (17 years, 10 months ago) by yamt
Branches: MAIN
CVS tags: mjf-devfs2-base
Diff to: previous 1.285: preferred, colored
Changes since revision 1.285: +8 -8 lines
g/c BUFQ_FOO() macros and use bufq_foo() directly.

Revision 1.285: download - view: text, markup, annotated - select for diffs
Sun Jan 11 10:05:53 2009 UTC (17 years, 10 months ago) by cegger
Branches: MAIN
Diff to: previous 1.284: preferred, colored
Changes since revision 1.284: +3 -3 lines
make this compile

Revision 1.284: download - view: text, markup, annotated - select for diffs
Tue Dec 30 19:38:36 2008 UTC (17 years, 10 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.283: preferred, colored
Changes since revision 1.283: +14 -7 lines
Add ISO partition detection enabling auto-detection of iso9660 and UDF
partitions on optical media like CD/DVD/BD but also on all other media if
there is no NetBSD disklabel or MBR label.

Also fix cd's readdisklabel arguments so the ioctl's arrive at the right
device (!) and update its default label to make more sense.

Revision 1.282.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 19 22:17:04 2008 UTC (18 years, 1 month ago) by haad
Branches: haad-dm
Diff to: previous 1.282: preferred, colored; next MAIN 1.283: preferred, colored
Changes since revision 1.282: +2 -4 lines
Sync with HEAD.

Revision 1.272.6.6: download - view: text, markup, annotated - select for diffs
Sun Sep 28 10:40:31 2008 UTC (18 years, 1 month ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.272.6.5: preferred, colored; branchpoint 1.272: preferred, colored
Changes since revision 1.272.6.5: +0 -2 lines
Sync with HEAD.

Revision 1.278.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:35:10 2008 UTC (18 years, 2 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.278.2.1: preferred, colored; next MAIN 1.279: preferred, colored
Changes since revision 1.278.2.1: +2 -4 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.283: download - view: text, markup, annotated - select for diffs
Fri Sep 5 22:25:39 2008 UTC (18 years, 2 months ago) by gmcgarry
Branches: MAIN
CVS tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5
Diff to: previous 1.282: preferred, colored
Changes since revision 1.282: +2 -4 lines
Remove unreachable code introduced by rev 1.224.  Fixes PR#38973.

Revision 1.272.6.5: download - view: text, markup, annotated - select for diffs
Sun Jun 29 09:33:10 2008 UTC (18 years, 4 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.272.6.4: preferred, colored; branchpoint 1.272: preferred, colored
Changes since revision 1.272.6.4: +1 -1 lines
Sync with HEAD.

Revision 1.278.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 23 04:31:29 2008 UTC (18 years, 4 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.278: preferred, colored
Changes since revision 1.278: +371 -7 lines
Sync w/ -current. 34 merge conflicts to follow.

Revision 1.281.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 18 16:33:26 2008 UTC (18 years, 5 months ago) by simonb
Branches: simonb-wapbl
Diff to: previous 1.281: preferred, colored; next MAIN 1.282: preferred, colored
Changes since revision 1.281: +3 -3 lines
Sync with head.

Revision 1.273.2.2: download - view: text, markup, annotated - select for diffs
Tue Jun 17 09:14:57 2008 UTC (18 years, 5 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.273.2.1: preferred, colored; branchpoint 1.273: preferred, colored; next MAIN 1.274: preferred, colored
Changes since revision 1.273.2.1: +3 -3 lines
sync with head.

Revision 1.282: download - view: text, markup, annotated - select for diffs
Thu Jun 12 23:06:14 2008 UTC (18 years, 5 months ago) by cegger
Branches: MAIN
CVS tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: haad-dm
Diff to: previous 1.281: preferred, colored
Changes since revision 1.281: +3 -3 lines
use device_lookup_private to get softc

Revision 1.260.2.1.2.1: download - view: text, markup, annotated - select for diffs
Tue Jun 3 20:47:34 2008 UTC (18 years, 5 months ago) by skrll
Branches: wrstuden-fixsa
Diff to: previous 1.260.2.1: preferred, colored; next MAIN 1.260.2.2: preferred, colored
Changes since revision 1.260.2.1: +28 -11 lines
Sync with netbsd-4.

Revision 1.272.6.4: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:23:50 2008 UTC (18 years, 5 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.272.6.3: preferred, colored; branchpoint 1.272: preferred, colored
Changes since revision 1.272.6.3: +432 -20 lines
Sync with HEAD.

Revision 1.273.2.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:34:45 2008 UTC (18 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.273: preferred, colored
Changes since revision 1.273: +432 -20 lines
sync with head.

Revision 1.273.4.1: download - view: text, markup, annotated - select for diffs
Fri May 16 02:25:06 2008 UTC (18 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.273: preferred, colored
Changes since revision 1.273: +432 -20 lines
sync with head.

Revision 1.281: download - view: text, markup, annotated - select for diffs
Mon May 12 21:39:56 2008 UTC (18 years, 6 months ago) by jnemeth
Branches: MAIN
CVS tags: yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: simonb-wapbl
Diff to: previous 1.280: preferred, colored
Changes since revision 1.280: +39 -2 lines
add support for drvctl properties

Revision 1.280: download - view: text, markup, annotated - select for diffs
Mon May 12 09:41:02 2008 UTC (18 years, 6 months ago) by tron
Branches: MAIN
Diff to: previous 1.279: preferred, colored
Changes since revision 1.279: +16 -17 lines
Fix SSP kernel builds.

Revision 1.279: download - view: text, markup, annotated - select for diffs
Thu May 8 12:57:19 2008 UTC (18 years, 6 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.278: preferred, colored
Changes since revision 1.278: +334 -6 lines
Implement write support for the MMC framework. This consists of a setting
up of write parameters call and a call to perform a series of operations on
these devices.

Note that the MMC framework interface is still not exposed to userland
unless the expose_mmc flag is set. This is to prevent applications to build
on a possibly still moving target. This flag will eventually be removed.

Revision 1.278: download - view: text, markup, annotated - select for diffs
Tue May 6 11:08:19 2008 UTC (18 years, 6 months ago) by yamt
Branches: MAIN
Branch point for: wrstuden-revivesa
Diff to: previous 1.277: preferred, colored
Changes since revision 1.277: +4 -4 lines
getiobuf(false, NULL) -> getiobuf(NULL, false)

Revision 1.277: download - view: text, markup, annotated - select for diffs
Fri May 2 16:06:38 2008 UTC (18 years, 6 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.276: preferred, colored
Changes since revision 1.276: +11 -2 lines
Extend the MMC framework to also create sensible reports on audio discs.

Revision 1.276: download - view: text, markup, annotated - select for diffs
Fri May 2 15:53:10 2008 UTC (18 years, 6 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.275: preferred, colored
Changes since revision 1.275: +27 -2 lines
Fixup CD and DVD drives that appear to be on crack when reporting features.
They state f.e. that a recordable CD-R is rewritable or completely forget
that the fixed packet size formatted CD-RW is strict overwrite rewritable
and not randomly rewritable.

Revision 1.275: download - view: text, markup, annotated - select for diffs
Fri May 2 15:34:16 2008 UTC (18 years, 6 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.274: preferred, colored
Changes since revision 1.274: +28 -7 lines
Make the SCSI sense code "Logical Unit Not Ready, Operation In Progress"
(Sense code 0x04, 0x07) not a fatal error anymore but retry command later.
This sense code can be returned on a CD-MRW write that encounters a bad
block resulting in the drive being busy relocating it. During that time it
can return this sense code to indicate its busy for a while.

Also reduce waiting time for the other "Logical Unix Not Ready, Long Write
In Progress" to half a second.

Revision 1.274: download - view: text, markup, annotated - select for diffs
Mon Apr 28 20:23:57 2008 UTC (18 years, 6 months ago) by martin
Branches: MAIN
Diff to: previous 1.273: preferred, colored
Changes since revision 1.273: +2 -9 lines
Remove clause 3 and 4 from TNF licenses

Revision 1.272.6.3: download - view: text, markup, annotated - select for diffs
Sun Apr 6 09:58:51 2008 UTC (18 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.272.6.2: preferred, colored; branchpoint 1.272: preferred, colored
Changes since revision 1.272.6.2: +4 -7 lines
- after some discussion with agc@ i agreed it would be a good idea to move
  device_unregister_* to device_deregister_* to be more like the pmf(9)
  functions, especially since a lot of the time the function calls are next
  to each other.

- add device_register_name() support for dk(4).

Revision 1.272.6.2: download - view: text, markup, annotated - select for diffs
Thu Apr 3 12:42:56 2008 UTC (18 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.272.6.1: preferred, colored; branchpoint 1.272: preferred, colored
Changes since revision 1.272.6.1: +31 -33 lines
Sync with HEAD.

Revision 1.272.6.1: download - view: text, markup, annotated - select for diffs
Sat Mar 29 16:17:57 2008 UTC (18 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.272: preferred, colored
Changes since revision 1.272: +23 -4 lines
- etc/devfsd.conf: Add some rules to give nodes like /dev/tty and
  		   /dev/null better default modes, i.e. 0666.

- sbin/init: Run devfsd -s before going to multiuser.

- sys/arch: Provide arm32, i386, sparc with a mem_init() function to request
  	    device nodes for /dev/null, /dev/zero, etc.

- sys/dev: Convert rnd, wd, agp, raid, cd, sd, wsdisplay, wskbd, wsmouse,
	   wsmux, tty, bpf, swap to devfs New World Order.

- sys/fs/devfs: Make the visibility attribute of device nodes configurable.
	        Also provide a function to mount a devfs on boot.

- sys/kern: Add a new boot flag, -n. This disables devfs support. Unless
	    the -n flag is specified the kernel will mount a devfs file
	    system on boot.

Revision 1.273: download - view: text, markup, annotated - select for diffs
Mon Mar 24 18:27:06 2008 UTC (18 years, 7 months ago) by cube
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp
Diff to: previous 1.272: preferred, colored
Changes since revision 1.272: +31 -33 lines
Split device_t for cd(4).

Revision 1.269.4.3: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:06:25 2008 UTC (18 years, 9 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.269.4.2: preferred, colored; branchpoint 1.269: preferred, colored; next MAIN 1.270: preferred, colored
Changes since revision 1.269.4.2: +10 -14 lines
Sync with HEAD.

Revision 1.260.2.2: download - view: text, markup, annotated - select for diffs
Fri Feb 1 14:42:54 2008 UTC (18 years, 9 months ago) by riz
Branches: netbsd-4
CVS tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base
Diff to: previous 1.260.2.1: preferred, colored; branchpoint 1.260: preferred, colored; next MAIN 1.261: preferred, colored
Changes since revision 1.260.2.1: +26 -9 lines
Pull up following revision(s) (requested by reinoud in ticket #1004):
	sys/dev/scsipi/cd.c: revision 1.270
	sys/sys/cdio.h: revision 1.29
	sys/fs/udf/udf_subr.c: revision 1.42
Pullup fixes from UDF write development project. This patch fixes a
conceptional bug in mmc_discinfo, improves DVD+R feature detection and
prevents corruption of mmc_trackinfo readout on some devices that return
short trackinfo structures.
Pullup fixes from UDF RW support project. This commit fixes the
mmc_discinfo conceptional bug and also vastly improves VAT searching.

Revision 1.223.2.7: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:44:33 2008 UTC (18 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.223.2.6: preferred, colored; next MAIN 1.224: preferred, colored
Changes since revision 1.223.2.6: +13 -15 lines
sync with head

Revision 1.268.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:54:29 2008 UTC (18 years, 10 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.268.2.1: preferred, colored; branchpoint 1.268: preferred, colored; next MAIN 1.269: preferred, colored
Changes since revision 1.268.2.1: +39 -24 lines
sync with HEAD

Revision 1.271.2.1: download - view: text, markup, annotated - select for diffs
Wed Jan 2 21:55:11 2008 UTC (18 years, 10 months ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.271: preferred, colored; next MAIN 1.272: preferred, colored
Changes since revision 1.271: +10 -14 lines
Sync with HEAD

Revision 1.272: download - view: text, markup, annotated - select for diffs
Wed Jan 2 11:48:38 2008 UTC (18 years, 10 months ago) by ad
Branches: MAIN
CVS tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Branch point for: mjf-devfs2
Diff to: previous 1.271: preferred, colored
Changes since revision 1.271: +10 -14 lines
Merge vmlocking2 to head.

Revision 1.269.4.2: download - view: text, markup, annotated - select for diffs
Thu Dec 27 00:45:27 2007 UTC (18 years, 10 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.269.4.1: preferred, colored; branchpoint 1.269: preferred, colored
Changes since revision 1.269.4.1: +5 -3 lines
Sync with HEAD.

Revision 1.270.2.2: download - view: text, markup, annotated - select for diffs
Wed Dec 26 21:39:28 2007 UTC (18 years, 10 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.270.2.1: preferred, colored; branchpoint 1.270: preferred, colored; next MAIN 1.271: preferred, colored
Changes since revision 1.270.2.1: +5 -3 lines
Sync with head.

Revision 1.270.4.1: download - view: text, markup, annotated - select for diffs
Tue Dec 11 15:39:58 2007 UTC (18 years, 11 months ago) by yamt
Branches: yamt-kmem
Diff to: previous 1.270: preferred, colored; next MAIN 1.271: preferred, colored
Changes since revision 1.270: +5 -3 lines
sync with head.

Revision 1.271: download - view: text, markup, annotated - select for diffs
Sun Dec 9 20:28:22 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: MAIN
CVS tags: yamt-kmem-base3, yamt-kmem-base2, vmlocking2-base3, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Diff to: previous 1.270: preferred, colored
Changes since revision 1.270: +5 -3 lines
Merge jmcneill-pm branch.

Revision 1.269.4.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 18:19:57 2007 UTC (18 years, 11 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.269: preferred, colored
Changes since revision 1.269: +28 -11 lines
Sync with HEAD.

Revision 1.267.4.6: download - view: text, markup, annotated - select for diffs
Sat Dec 8 16:21:35 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.267.4.5: preferred, colored; branchpoint 1.267: preferred, colored; next MAIN 1.268: preferred, colored
Changes since revision 1.267.4.5: +3 -3 lines
Rename pnp(9) -> pmf(9), as requested by many.

Revision 1.223.2.6: download - view: text, markup, annotated - select for diffs
Fri Dec 7 17:31:07 2007 UTC (18 years, 11 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.223.2.5: preferred, colored
Changes since revision 1.223.2.5: +28 -11 lines
sync with head

Revision 1.270.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 4 13:02:59 2007 UTC (18 years, 11 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.270: preferred, colored
Changes since revision 1.270: +10 -14 lines
Pull the vmlocking changes into a new branch.

Revision 1.267.4.5: download - view: text, markup, annotated - select for diffs
Mon Dec 3 16:14:39 2007 UTC (18 years, 11 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.267.4.4: preferred, colored; branchpoint 1.267: preferred, colored
Changes since revision 1.267.4.4: +28 -11 lines
Sync with HEAD.

Revision 1.267.4.4: download - view: text, markup, annotated - select for diffs
Sat Dec 1 04:14:35 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.267.4.3: preferred, colored; branchpoint 1.267: preferred, colored
Changes since revision 1.267.4.3: +3 -13 lines
Since I'm not convinced that cd_suspend does anything useful other than
to complain that a disc is not present in my drive, nuke it.

Revision 1.270: download - view: text, markup, annotated - select for diffs
Tue Nov 27 18:06:37 2007 UTC (18 years, 11 months ago) by reinoud
Branches: MAIN
CVS tags: yamt-kmem-base, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base
Branch point for: yamt-kmem, vmlocking2
Diff to: previous 1.269: preferred, colored
Changes since revision 1.269: +28 -11 lines
Pullup fixes from UDF write development project. This patch fixes a
conceptional bug in mmc_discinfo, improves DVD+R feature detection and
prevents corruption of mmc_trackinfo readout on some devices that return
short trackinfo structures.

Revision 1.268.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:30:14 2007 UTC (19 years ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +4 -4 lines
sync with HEAD

Revision 1.267.4.3: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:03:26 2007 UTC (19 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.267.4.2: preferred, colored; branchpoint 1.267: preferred, colored
Changes since revision 1.267.4.2: +14 -2 lines
Flush caches on suspend as discussed with reinoud@

Revision 1.223.2.5: download - view: text, markup, annotated - select for diffs
Sat Oct 27 11:34:16 2007 UTC (19 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.223.2.4: preferred, colored
Changes since revision 1.223.2.4: +4 -4 lines
sync with head.

Revision 1.267.4.2: download - view: text, markup, annotated - select for diffs
Fri Oct 26 15:47:36 2007 UTC (19 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.267.4.1: preferred, colored; branchpoint 1.267: preferred, colored
Changes since revision 1.267.4.1: +4 -4 lines
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.

Revision 1.268.4.1: download - view: text, markup, annotated - select for diffs
Sun Oct 14 11:48:17 2007 UTC (19 years, 1 month ago) by yamt
Branches: yamt-x86pmap
Diff to: previous 1.268: preferred, colored; next MAIN 1.269: preferred, colored
Changes since revision 1.268: +4 -4 lines
sync with head.

Revision 1.262.2.9: download - view: text, markup, annotated - select for diffs
Tue Oct 9 15:22:11 2007 UTC (19 years, 1 month ago) by ad
Branches: vmlocking
Diff to: previous 1.262.2.8: preferred, colored; branchpoint 1.262: preferred, colored; next MAIN 1.263: preferred, colored
Changes since revision 1.262.2.8: +90 -73 lines
Sync with head.

Revision 1.269: download - view: text, markup, annotated - select for diffs
Mon Oct 8 16:41:14 2007 UTC (19 years, 1 month ago) by ad
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +4 -4 lines
Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.

Revision 1.223.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:38:34 2007 UTC (19 years, 2 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.223.2.3: preferred, colored
Changes since revision 1.223.2.3: +240 -194 lines
sync with head.

Revision 1.262.2.8: download - view: text, markup, annotated - select for diffs
Fri Aug 24 23:28:37 2007 UTC (19 years, 2 months ago) by ad
Branches: vmlocking
Diff to: previous 1.262.2.7: preferred, colored; branchpoint 1.262: preferred, colored
Changes since revision 1.262.2.7: +10 -8 lines
Sync with buffer cache locking changes. See buf.h/vfs_bio.c for details.
Some minor portions are incomplete and needs to be verified as a whole.

Revision 1.262.2.7: download - view: text, markup, annotated - select for diffs
Mon Aug 20 22:42:52 2007 UTC (19 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.262.2.6: preferred, colored; branchpoint 1.262: preferred, colored
Changes since revision 1.262.2.6: +920 -420 lines
Sync with head.

Revision 1.262.2.6: download - view: text, markup, annotated - select for diffs
Mon Aug 20 18:37:46 2007 UTC (19 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.262.2.5: preferred, colored; branchpoint 1.262: preferred, colored
Changes since revision 1.262.2.5: +420 -920 lines
Sync with HEAD.

Revision 1.262.2.5: download - view: text, markup, annotated - select for diffs
Mon Aug 20 18:16:15 2007 UTC (19 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.262.2.4: preferred, colored; branchpoint 1.262: preferred, colored
Changes since revision 1.262.2.4: +23 -24 lines
- Alter disk attach/detach to fix a panic when closing a vnd device.
- Sync with HEAD.

Revision 1.262.2.4: download - view: text, markup, annotated - select for diffs
Sun Aug 19 19:24:33 2007 UTC (19 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.262.2.3: preferred, colored; branchpoint 1.262: preferred, colored
Changes since revision 1.262.2.3: +30 -16 lines
- Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).

Revision 1.265.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 15 13:48:43 2007 UTC (19 years, 3 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.265: preferred, colored; next MAIN 1.266: preferred, colored
Changes since revision 1.265: +112 -96 lines
Sync with HEAD.

Revision 1.267.4.1: download - view: text, markup, annotated - select for diffs
Sat Aug 4 12:33:13 2007 UTC (19 years, 3 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +97 -68 lines
Sync with HEAD.

Revision 1.268.6.2: download - view: text, markup, annotated - select for diffs
Sat Aug 4 02:59:00 2007 UTC (19 years, 3 months ago) by rumble
Branches: matt-mips64
Diff to: previous 1.268.6.1: preferred, colored; branchpoint 1.268: preferred, colored; next MAIN 1.269: preferred, colored
Changes since revision 1.268.6.1: +3471 -0 lines
Be sure not to make requests over MAXPHYS when employing bounce buffers.
It was previously possible to round up one sector length if the start block
were not properly aligned.

Resolves PR kern/36716. This may also fix the following reported issues
on port-sgimips:
    http://mail-index.netbsd.org/port-sgimips/2005/09/12/0000.html
    http://mail-index.netbsd.org/port-sgimips/2005/09/14/0000.html

While here, be sure to put back allocated bufs, which previously appear
to have been leaked. Further, remove the dead write bounce code which never
got executed anyway.

No complaints on tech-kern.

Revision 1.268.6.1
Sat Aug 4 02:58:59 2007 UTC (19 years, 3 months ago) by rumble
Branches: matt-mips64
FILE REMOVED
Changes since revision 1.268: +0 -3471 lines
file cd.c was added on branch matt-mips64 on 2007-08-04 02:59:00 +0000

Revision 1.268: download - view: text, markup, annotated - select for diffs
Sat Aug 4 02:58:59 2007 UTC (19 years, 3 months ago) by rumble
Branches: MAIN
CVS tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5, matt-mips64-base
Branch point for: yamt-x86pmap, matt-mips64, matt-armv6
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +97 -68 lines
Be sure not to make requests over MAXPHYS when employing bounce buffers.
It was previously possible to round up one sector length if the start block
were not properly aligned.

Resolves PR kern/36716. This may also fix the following reported issues
on port-sgimips:
    http://mail-index.netbsd.org/port-sgimips/2005/09/12/0000.html
    http://mail-index.netbsd.org/port-sgimips/2005/09/14/0000.html

While here, be sure to put back allocated bufs, which previously appear
to have been leaked. Further, remove the dead write bounce code which never
got executed anyway.

No complaints on tech-kern.

Revision 1.267: download - view: text, markup, annotated - select for diffs
Sun Jul 29 12:50:22 2007 UTC (19 years, 3 months ago) by ad
Branches: MAIN
CVS tags: hpcarm-cleanup
Branch point for: jmcneill-pm
Diff to: previous 1.266: preferred, colored
Changes since revision 1.266: +8 -14 lines
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.

Revision 1.266: download - view: text, markup, annotated - select for diffs
Sat Jul 21 19:51:48 2007 UTC (19 years, 4 months ago) by ad
Branches: MAIN
Diff to: previous 1.265: preferred, colored
Changes since revision 1.265: +11 -18 lines
Replace some uses of lockmgr().

Revision 1.262.2.3: download - view: text, markup, annotated - select for diffs
Sun Jul 15 13:21:44 2007 UTC (19 years, 4 months ago) by ad
Branches: vmlocking
Diff to: previous 1.262.2.2: preferred, colored; branchpoint 1.262: preferred, colored
Changes since revision 1.262.2.2: +126 -96 lines
Sync with head.

Revision 1.262.4.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:08:15 2007 UTC (19 years, 4 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.262: preferred, colored; next MAIN 1.263: preferred, colored
Changes since revision 1.262: +127 -97 lines
Sync with head.

Revision 1.265: download - view: text, markup, annotated - select for diffs
Mon Jul 9 21:01:21 2007 UTC (19 years, 4 months ago) by ad
Branches: MAIN
CVS tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +3 -3 lines
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.262.2.2: download - view: text, markup, annotated - select for diffs
Sun Jul 1 21:48:57 2007 UTC (19 years, 4 months ago) by ad
Branches: vmlocking
Diff to: previous 1.262.2.1: preferred, colored; branchpoint 1.262: preferred, colored
Changes since revision 1.262.2.1: +3 -3 lines
Adapt to callout API change.

Revision 1.264: download - view: text, markup, annotated - select for diffs
Sat Jun 30 22:16:38 2007 UTC (19 years, 4 months ago) by dsl
Branches: MAIN
Diff to: previous 1.263: preferred, colored
Changes since revision 1.263: +112 -80 lines
The cd ioctl definitions are not condusive to being called from within
  the kernel (eg from withthe linux compat code).
Add CDIOCREADSUBCHANNEL_BUF and CDIOREADTOCENTRIES_BUF which are like the
  existing ioctls withoutthe _BUF, except that the data area immediately
  follows the control structure (and is fixed length).
Modify scsipi/cd.c so that it only ever has one 'struct cd_formatted_toc'
  allocated on the stack (maybe this info ought to be in the softc)
  structure since even one 800 byte on-stack buffer isn't overly friendly.
cdplay(1) still seems able to read the track-list of an ATAPI cd.

Revision 1.263: download - view: text, markup, annotated - select for diffs
Sat Jun 30 16:00:55 2007 UTC (19 years, 4 months ago) by dsl
Branches: MAIN
Diff to: previous 1.262: preferred, colored
Changes since revision 1.262: +18 -20 lines
Remove a load of unnecessary casts now that 'addr' is 'void *'.

Revision 1.262.2.1: download - view: text, markup, annotated - select for diffs
Sun May 13 17:36:28 2007 UTC (19 years, 6 months ago) by ad
Branches: vmlocking
Diff to: previous 1.262: preferred, colored
Changes since revision 1.262: +19 -39 lines
- Pass the error number and residual count to biodone(), and let it handle
  setting error indicators. Prepare to eliminate B_ERROR.
- Add a flag argument to brelse() to be set into the buf's flags, instead
  of doing it directly. Typically used to set B_INVAL.
- Add a "struct cpu_info *" argument to kthread_create(), to be used to
  create bound threads. Change "bool mpsafe" to "int flags".
- Allow exit of LWPs in the IDL state when (l != curlwp).
- More locking fixes & conversion to the new API.

Revision 1.261.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 12 05:57:09 2007 UTC (19 years, 8 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.261: preferred, colored; next MAIN 1.262: preferred, colored
Changes since revision 1.261: +7 -7 lines
Sync with HEAD.

Revision 1.262: download - view: text, markup, annotated - select for diffs
Sun Mar 4 06:02:42 2007 UTC (19 years, 8 months ago) by christos
Branches: MAIN
CVS tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Diff to: previous 1.261: preferred, colored
Changes since revision 1.261: +7 -7 lines
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.223.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:10:40 2007 UTC (19 years, 8 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.223.2.2: preferred, colored
Changes since revision 1.223.2.2: +27 -27 lines
sync with head.

Revision 1.248.2.3: download - view: text, markup, annotated - select for diffs
Thu Feb 1 08:48:27 2007 UTC (19 years, 9 months ago) by ad
Branches: newlock2
Diff to: previous 1.248.2.2: preferred, colored; branchpoint 1.248: preferred, colored; next MAIN 1.249: preferred, colored
Changes since revision 1.248.2.2: +27 -27 lines
Sync with head.

Revision 1.260.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 15 22:15:13 2007 UTC (19 years, 10 months ago) by pavel
Branches: netbsd-4
CVS tags: wrstuden-fixsa-base-1, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Branch point for: wrstuden-fixsa
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +27 -27 lines
Pull up following revision(s) (requested by martin in ticket #371):
	sys/dev/scsipi/cd.c: revision 1.261
	sys/dev/ic/wdc.c: revision 1.244
If __NO_STRICT_ALIGNMENT is not defined, take special care to do PIO
transfers with proper alignement - this removes alignement restrictions
of the buffer pointer passed.
Thanks to bouyer, reinoud, jdc for helping with the code, and special
thanks to Dave Huang for testing.
The previous fix for PR 34202 was wrong (some sizeof used the union, not
the command block) - but instead of fixing this, we can now revert it
completley: the real fix has been applied to ../ic/wdc.c in rev. 1.244,
removing the alignement constraints.

Revision 1.261: download - view: text, markup, annotated - select for diffs
Sun Jan 14 09:29:24 2007 UTC (19 years, 10 months ago) by martin
Branches: MAIN
CVS tags: post-newlock2-merge, newlock2-nbase, newlock2-base, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +25 -25 lines
The previous fix for PR 34202 was wrong (some sizeof used the union, not
the command block) - but instead of fixing this, we can now revert it
completley: the real fix has been applied to ../ic/wdc.c in rev. 1.244,
removing the alignement constraints.

Revision 1.248.2.2: download - view: text, markup, annotated - select for diffs
Fri Jan 12 00:57:48 2007 UTC (19 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.248.2.1: preferred, colored; branchpoint 1.248: preferred, colored
Changes since revision 1.248.2.1: +28 -37 lines
Sync with head.

Revision 1.223.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:49:33 2006 UTC (19 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.223.2.1: preferred, colored
Changes since revision 1.223.2.1: +200 -111 lines
sync with head.

Revision 1.250.2.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:18:15 2006 UTC (19 years, 11 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.250.2.1: preferred, colored; branchpoint 1.250: preferred, colored; next MAIN 1.251: preferred, colored
Changes since revision 1.250.2.1: +192 -111 lines
sync with head.

Revision 1.260: download - view: text, markup, annotated - select for diffs
Fri Dec 1 21:23:57 2006 UTC (19 years, 11 months ago) by martin
Branches: MAIN
CVS tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, netbsd-4-base
Branch point for: netbsd-4
Diff to: previous 1.259: preferred, colored
Changes since revision 1.259: +27 -27 lines
Fix PR kern/34202 differently, by aligning the variables "the traditional
way".

Revision 1.259: download - view: text, markup, annotated - select for diffs
Sat Nov 25 12:03:38 2006 UTC (19 years, 11 months ago) by scw
Branches: MAIN
Diff to: previous 1.258: preferred, colored
Changes since revision 1.258: +3 -12 lines
- Call disk_blocksize(9) when we determine the physical block size of the
  media. (Will this ever be anything other than 2048?)
- bounds_check_with_label() has been fixed, so put the correct partition
  size in the default disklabel.

Revision 1.248.2.1: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:34:48 2006 UTC (20 years ago) by ad
Branches: newlock2
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +162 -68 lines
Sync with head.

Revision 1.258: download - view: text, markup, annotated - select for diffs
Thu Nov 16 01:33:26 2006 UTC (20 years ago) by christos
Branches: MAIN
Diff to: previous 1.257: preferred, colored
Changes since revision 1.257: +16 -16 lines
__unused removal on arguments; approved by core.

Revision 1.257: download - view: text, markup, annotated - select for diffs
Tue Nov 14 14:56:55 2006 UTC (20 years ago) by reinoud
Branches: MAIN
Diff to: previous 1.256: preferred, colored
Changes since revision 1.256: +44 -2 lines
Implement/add bufq strategy setting by dkctl for the CD class devices.

Though its hardly advisable to change the CD strategy setting to anything
other than `disksort' or `prioscan' it ought to be possible.

Revision 1.256: download - view: text, markup, annotated - select for diffs
Sat Oct 28 01:24:29 2006 UTC (20 years ago) by reinoud
Branches: MAIN
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +25 -2 lines
Implement another class of `unit not ready' sense handling that is not
fatal.. A `long write in progress' is a retry again later command that is
issued when a device returns immediately after a write request but needs
some time before it can handle read requests.

Revision 1.255: download - view: text, markup, annotated - select for diffs
Fri Oct 27 21:58:59 2006 UTC (20 years ago) by christos
Branches: MAIN
Diff to: previous 1.254: preferred, colored
Changes since revision 1.254: +87 -62 lines
- don't allocate huge arrays on the stack
- no bogus ; after }; in block statements!

Revision 1.250.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 22 06:06:47 2006 UTC (20 years ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +21 -17 lines
sync with head

Revision 1.254: download - view: text, markup, annotated - select for diffs
Thu Oct 12 01:31:57 2006 UTC (20 years, 1 month ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base2
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +17 -15 lines
- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.253: download - view: text, markup, annotated - select for diffs
Tue Oct 10 23:35:29 2006 UTC (20 years, 1 month ago) by riz
Branches: MAIN
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +3 -3 lines
Also print blksize with %u - this is what I get for eyeballing
a patch instead of applying it directly.  PR#33966.

Revision 1.252: download - view: text, markup, annotated - select for diffs
Tue Oct 10 23:30:23 2006 UTC (20 years, 1 month ago) by riz
Branches: MAIN
Diff to: previous 1.251: preferred, colored
Changes since revision 1.251: +3 -3 lines
Print an unsigned parameter with %lu, not %ld.  From David A. Holland
in PR#33966.

Revision 1.251: download - view: text, markup, annotated - select for diffs
Sun Oct 8 07:50:16 2006 UTC (20 years, 1 month ago) by mlelstv
Branches: MAIN
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +5 -3 lines
Use last track info only if it gives a sane value. Fixes PR#34688.

Revision 1.240.2.4: download - view: text, markup, annotated - select for diffs
Thu Sep 14 12:31:40 2006 UTC (20 years, 2 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.240.2.3: preferred, colored; branchpoint 1.240: preferred, colored; next MAIN 1.241: preferred, colored
Changes since revision 1.240.2.3: +4 -4 lines
sync with head.

Revision 1.242.6.4: download - view: text, markup, annotated - select for diffs
Mon Sep 11 21:18:09 2006 UTC (20 years, 2 months ago) by tron
Branches: abandoned-netbsd-4
Diff to: previous 1.242.6.3: preferred, colored; branchpoint 1.242: preferred, colored; next MAIN 1.243: preferred, colored
Changes since revision 1.242.6.3: +3 -3 lines
Pull up following revision(s) (requested by reinoud in ticket #147):
	sys/dev/scsipi/cd.c: revision 1.250
Oeps! I overlooked the size argument of the SCSI call. It ought to be equal
to the number of bytes we are reading: READ_DISCINFO_BIGSIZE
sorry.

Revision 1.242.6.3: download - view: text, markup, annotated - select for diffs
Mon Sep 11 21:17:30 2006 UTC (20 years, 2 months ago) by tron
Branches: abandoned-netbsd-4
Diff to: previous 1.242.6.2: preferred, colored; branchpoint 1.242: preferred, colored
Changes since revision 1.242.6.2: +1 -1 lines
Pull up following revision(s) (requested by reinoud in ticket #147):
	sys/dev/scsipi/cd.c: revision 1.249
The size of struct scsipi_read_discinfo_data is not even due to the data[1]
pseudo array in the structure. The scsi command issued used
sizeof(scsipi_read_discinfo_data) but included thus the last byte that
wasn't going to be inspected anyway. Using the constant
READ_DISCINFO_BIGSIZE fixes the bug.
Even though SCSI adapters *should* accept odd lengths, the Sun U10
(sparc64's) crashes in bus_space_read_multi_stream_2(). That explains the
crash.
NOTE: somewhere in NetBSD/sparc64's atapibus support there is the
assumption on the even size; this needs to be fixed! (Hi Sparc64 portmaster
-) )

Revision 1.237.2.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 02:54:25 2006 UTC (20 years, 2 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.237: preferred, colored; next MAIN 1.238: preferred, colored
Changes since revision 1.237: +812 -17 lines
sync with head

Revision 1.242.6.2: download - view: text, markup, annotated - select for diffs
Fri Sep 8 18:41:21 2006 UTC (20 years, 2 months ago) by rpaulo
Branches: abandoned-netbsd-4
Diff to: previous 1.242.6.1: preferred, colored; branchpoint 1.242: preferred, colored
Changes since revision 1.242.6.1: +6 -4 lines
Pull up following revision(s) (requested by reinoud in ticket #124):
	sys/dev/scsipi/cd.c: revision 1.245
	sys/dev/scsipi/cd.c: revision 1.246
	sys/dev/scsipi/cd.c: revision 1.247
Fix fencing bug on CD disk size; the comment was wrong, its the *length* of
the device and since we count from zero its equal to the number of sectors
and thus one higher than the last sector.
This fixes the read/write problems on the (raw) device where the last
sector was not readable/writable.
Remove two spurious empty lines in functions
Fix panic on reading/writing to a (raw) CD device and encountering an
error. It now correctly sets bp->b_resid to the full size of the buffer.
The failed SCSI read/write command allways contains the complete buffer.
When encountering a read (or write) error, the scsipi stack sets the
xs->resid to zero since the command has been accepted by the drive. The
scsi command set does not allow a partial read or write to be performed and
will signal a success or an error.

Revision 1.250: download - view: text, markup, annotated - select for diffs
Fri Sep 8 00:33:18 2006 UTC (20 years, 2 months ago) by reinoud
Branches: MAIN
CVS tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +3 -3 lines
Oeps! I overlooked the size argument of the SCSI call. It ought to be equal
to the number of bytes we are reading: READ_DISCINFO_BIGSIZE

sorry.

Revision 1.249: download - view: text, markup, annotated - select for diffs
Thu Sep 7 22:52:46 2006 UTC (20 years, 2 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +3 -3 lines
The size of struct scsipi_read_discinfo_data is not even due to the data[1]
pseudo array in the structure. The scsi command issued used
sizeof(scsipi_read_discinfo_data) but included thus the last byte that
wasn't going to be inspected anyway. Using the constant
READ_DISCINFO_BIGSIZE fixes the bug.

Even though SCSI adapters *should* accept odd lengths, the Sun U10
(sparc64's) crashes in bus_space_read_multi_stream_2(). That explains the
crash.

NOTE: somewhere in NetBSD/sparc64's atapibus support there is the
assumption on the even size; this needs to be fixed! (Hi Sparc64 portmaster
:-) )

Revision 1.240.2.3: download - view: text, markup, annotated - select for diffs
Sun Sep 3 15:24:48 2006 UTC (20 years, 2 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.240.2.2: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.2.2: +11 -9 lines
sync with head.

Revision 1.248: download - view: text, markup, annotated - select for diffs
Fri Sep 1 03:29:32 2006 UTC (20 years, 2 months ago) by matt
Branches: MAIN
CVS tags: yamt-pdpolicy-base8
Branch point for: newlock2
Diff to: previous 1.247: preferred, colored
Changes since revision 1.247: +4 -4 lines
Use an unsigned int for the blksize on read_cd_capacity.

Revision 1.247: download - view: text, markup, annotated - select for diffs
Thu Aug 31 21:32:42 2006 UTC (20 years, 2 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +7 -3 lines
Fix panic on reading/writing to a (raw) CD device and encountering an
error. It now correctly sets bp->b_resid to the full size of the buffer.
The failed SCSI read/write command allways contains the complete buffer.

When encountering a read (or write) error, the scsipi stack sets the
xs->resid to zero since the command has been accepted by the drive. The
scsi command set does not allow a partial read or write to be performed and
will signal a success or an error.

Revision 1.246: download - view: text, markup, annotated - select for diffs
Thu Aug 31 20:22:34 2006 UTC (20 years, 2 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.245: preferred, colored
Changes since revision 1.245: +2 -4 lines
Remove two spurious empty lines in functions

Revision 1.245: download - view: text, markup, annotated - select for diffs
Thu Aug 31 19:46:54 2006 UTC (20 years, 2 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +3 -3 lines
Fix fencing bug on CD disk size; the comment was wrong, its the *length* of
the device and since we count from zero its equal to the number of sectors
and thus one higher than the last sector.

This fixes the read/write problems on the (raw) device where the last
sector was not readable/writable.

Revision 1.244: download - view: text, markup, annotated - select for diffs
Mon Aug 28 00:22:15 2006 UTC (20 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +3 -3 lines
Add missing initializer.

Revision 1.242.6.1: download - view: text, markup, annotated - select for diffs
Sat Aug 12 16:05:28 2006 UTC (20 years, 3 months ago) by riz
Branches: abandoned-netbsd-4
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +7 -5 lines
Pull up following revision(s) (requested by reinoud in ticket #12):
	sys/fs/udf/udf_vfsops.c: revision 1.9
	sys/dev/scsipi/cd.c: revision 1.243
Fix panic on badly or curruptly formatted discs due to an oddity in the
error handling chain.
If NetBSD 4.0 is allready branched at this time this ought to be pulled up.
Fix incorrect `last possible lba' reporting, remove some empty lines and
add mmc classification for some still rare HD DVD device types.

Revision 1.240.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 11 15:45:08 2006 UTC (20 years, 3 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.240.2.1: preferred, colored; branchpoint 1.240: preferred, colored
Changes since revision 1.240.2.1: +7 -5 lines
sync with head

Revision 1.243: download - view: text, markup, annotated - select for diffs
Thu Aug 10 14:45:51 2006 UTC (20 years, 3 months ago) by reinoud
Branches: MAIN
CVS tags: yamt-pdpolicy-base7
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +7 -5 lines
Fix incorrect `loast possible lba' reporting, remove some empty lines and
add mmc classification for some still rare HD DVD device types.

Revision 1.223.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 15:06:47 2006 UTC (20 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +1020 -109 lines
sync with head.

Revision 1.220.2.2: download - view: text, markup, annotated - select for diffs
Thu Apr 27 20:37:42 2006 UTC (20 years, 6 months ago) by tron
Branches: netbsd-3
CVS tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1
Diff to: previous 1.220.2.1: preferred, colored; branchpoint 1.220: preferred, colored; next MAIN 1.221: preferred, colored
Changes since revision 1.220.2.1: +13 -8 lines
Pull up following revision(s) (requested by pavel in ticket #1290):
	sys/dev/scsipi/cd.c: revision 1.224
Always allow open() on the raw partition to succeed, even if any of the
SCSI command in cdopen() fails. Fix PR kern/30288 by Pavel Cahyna.

Revision 1.238.2.1: download - view: text, markup, annotated - select for diffs
Sat Apr 22 11:39:29 2006 UTC (20 years, 7 months ago) by simonb
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.238: preferred, colored; next MAIN 1.239: preferred, colored
Changes since revision 1.238: +10 -7 lines
Sync with head.

Revision 1.240.4.1: download - view: text, markup, annotated - select for diffs
Wed Apr 19 03:26:19 2006 UTC (20 years, 7 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.240: preferred, colored; next MAIN 1.241: preferred, colored
Changes since revision 1.240: +7 -7 lines
sync with head.

Revision 1.240.2.1: download - view: text, markup, annotated - select for diffs
Sat Apr 1 12:07:27 2006 UTC (20 years, 7 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +7 -7 lines
sync with head.

Revision 1.240.6.1: download - view: text, markup, annotated - select for diffs
Fri Mar 31 09:45:25 2006 UTC (20 years, 7 months ago) by tron
Branches: peter-altq
Diff to: previous 1.240: preferred, colored; next MAIN 1.241: preferred, colored
Changes since revision 1.240: +7 -7 lines
Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.

Revision 1.242: download - view: text, markup, annotated - select for diffs
Thu Mar 30 16:09:28 2006 UTC (20 years, 7 months ago) by thorpej
Branches: MAIN
CVS tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base
Branch point for: abandoned-netbsd-4
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +4 -4 lines
Use device_private().

Revision 1.241: download - view: text, markup, annotated - select for diffs
Tue Mar 28 17:38:34 2006 UTC (20 years, 7 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +5 -5 lines
Use device_unit().

Revision 1.234.2.2: download - view: text, markup, annotated - select for diffs
Sat Feb 18 15:39:11 2006 UTC (20 years, 9 months ago) by yamt
Branches: yamt-uio_vmspace
Diff to: previous 1.234.2.1: preferred, colored; next MAIN 1.235: preferred, colored
Changes since revision 1.234.2.1: +794 -3 lines
sync with head.

Revision 1.240: download - view: text, markup, annotated - select for diffs
Wed Feb 8 23:09:15 2006 UTC (20 years, 9 months ago) by reinoud
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +3 -3 lines
Add name of the processed feature like the others have.

Revision 1.239: download - view: text, markup, annotated - select for diffs
Sat Feb 4 21:26:15 2006 UTC (20 years, 9 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +5 -2 lines
Add support for SCSI MMC feature 0x0024: hardware assisted defect
management to be passed in mmc_discinfo's device capabilities.

When a device reports support for this the hardware will automatically
remap sectors on read- or write-errors. CD-MRW, DVD+MRW, DVD-RAM and BR-RE
support these.

Revision 1.238: download - view: text, markup, annotated - select for diffs
Thu Feb 2 14:48:02 2006 UTC (20 years, 9 months ago) by reinoud
Branches: MAIN
Branch point for: simonb-timecounters
Diff to: previous 1.237: preferred, colored
Changes since revision 1.237: +791 -3 lines
Adding two Ioctl's to scsipi's cd.c to abstract SCSI MMC devices. The
ioctl's and their structures are currenly hidden from inclusion for normal
userland applications to allow the MMC abstraction interface to mature
first.

Its useage is mainly for applications dedicated to handling and processing
SCSI MMC compliant devices and their media. Examples of these are CDs, DVDs
and comparable optical devices but also some magnetic swapable devices that
present themselves as a SCSI MMC compliant device.

Its current use is currently the to be committed in-kernel UDF filingsystem
and its userland tools.

Revision 1.234.2.1: download - view: text, markup, annotated - select for diffs
Sun Jan 15 10:02:56 2006 UTC (20 years, 10 months ago) by yamt
Branches: yamt-uio_vmspace
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +8 -15 lines
sync with head.

Revision 1.237: download - view: text, markup, annotated - select for diffs
Sat Jan 7 07:18:06 2006 UTC (20 years, 10 months ago) by christos
Branches: MAIN
Branch point for: rpaulo-netinet-merge-pcb
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +3 -3 lines
fix typo.

Revision 1.236: download - view: text, markup, annotated - select for diffs
Sat Jan 7 00:26:58 2006 UTC (20 years, 10 months ago) by yamt
Branches: MAIN
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +1 -1 lines
remove B_EINTR as it isn't used anymore.

Revision 1.235: download - view: text, markup, annotated - select for diffs
Wed Jan 4 10:13:05 2006 UTC (20 years, 10 months ago) by yamt
Branches: MAIN
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +7 -14 lines
- add simple functions to allocate/free a buffer for i/o.
- make bufpool static.

Revision 1.234: download - view: text, markup, annotated - select for diffs
Wed Dec 21 13:11:27 2005 UTC (20 years, 11 months ago) by reinoud
Branches: MAIN
Branch point for: yamt-uio_vmspace
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +75 -16 lines
Improve disc size reporting. The current discsize thats reported is the
current recorded extent and not the complete maximum extent of the disc.

An empty CD/DVD disc is seen as having an invalid length and given 800 Mb
size. This makes it possible to write to a CD-R using `dd' as some tend to
do.

However when an extent is recorded the initial recorded length is seen as
valid and is thus set as absolute upperbound to read and write actions
preventing extention of the disc.

Committed after consultation on tech-kern with a positive advice by Manuel
Bouyer.

Revision 1.233: download - view: text, markup, annotated - select for diffs
Fri Dec 16 17:54:36 2005 UTC (20 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +2 -4 lines
delete extraneous verbiage.

Revision 1.232: download - view: text, markup, annotated - select for diffs
Thu Dec 15 17:56:32 2005 UTC (20 years, 11 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +11 -11 lines
Clean up cdgetdisklabel. It was jumping over a return...

Revision 1.231: download - view: text, markup, annotated - select for diffs
Sun Dec 11 12:23:50 2005 UTC (20 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.230: preferred, colored
Changes since revision 1.230: +6 -6 lines
merge ktrace-lwp.

Revision 1.185.2.14: download - view: text, markup, annotated - select for diffs
Sun Dec 11 10:29:05 2005 UTC (20 years, 11 months ago) by christos
Branches: ktrace-lwp
Diff to: previous 1.185.2.13: preferred, colored; next MAIN 1.186: preferred, colored
Changes since revision 1.185.2.13: +27 -18 lines
Sync with head.

Revision 1.230: download - view: text, markup, annotated - select for diffs
Sun Dec 11 00:01:54 2005 UTC (20 years, 11 months ago) by reinoud
Branches: MAIN
CVS tags: ktrace-lwp-base
Diff to: previous 1.229: preferred, colored
Changes since revision 1.229: +5 -5 lines
Fix illogical use of extra variable. It was mainly to get a better
readability in KNF. This solution gives better readability without the
extra variable.

Revision 1.229: download - view: text, markup, annotated - select for diffs
Sat Dec 10 21:17:21 2005 UTC (20 years, 11 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +28 -19 lines
Second stage of read TOC modifications. Introducing the various forms of
TOC reading. Note that the external interfaces haven't changed. Only the
formatted toc is requestable.

The read msinfo command hasn't been changed in this patch though it could
become more clever using the CD_TOC_MSINFO format.

Revision 1.185.2.13: download - view: text, markup, annotated - select for diffs
Thu Nov 10 14:07:47 2005 UTC (21 years ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.185.2.12: preferred, colored
Changes since revision 1.185.2.12: +187 -127 lines
Sync with HEAD. Here we go again...

Revision 1.228: download - view: text, markup, annotated - select for diffs
Sat Oct 15 17:29:25 2005 UTC (21 years, 1 month ago) by yamt
Branches: MAIN
CVS tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +11 -11 lines
- 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)

Revision 1.227: download - view: text, markup, annotated - select for diffs
Tue Sep 6 22:19:14 2005 UTC (21 years, 2 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.226: preferred, colored
Changes since revision 1.226: +52 -41 lines
Cleanup and fix cd_size() function; it was returning wrong results.
Also factor out read_cd_capacity()

Revision 1.226: download - view: text, markup, annotated - select for diffs
Mon Sep 5 21:16:24 2005 UTC (21 years, 2 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +28 -2 lines
Implement DIOCCACHESYNC for SCSI/ATAPI cd/mmc recordable devices found by
scsipi/cd.c by issueing the SYNCHRONISE CACHES scsi/atapi call as defined
per MMC standard.

Revision 1.225: download - view: text, markup, annotated - select for diffs
Sun Aug 28 22:51:01 2005 UTC (21 years, 2 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +21 -2 lines
Document executed SCSI commands with the IOCTL's to prevent confusion.

Revision 1.224: download - view: text, markup, annotated - select for diffs
Wed Jul 6 14:28:39 2005 UTC (21 years, 4 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +15 -10 lines
Always allow open() on the raw partition to succeed, even if any of the
SCSI command in cdopen() fails. Fix PR kern/30288 by Pavel Cahyna.

Revision 1.223: download - view: text, markup, annotated - select for diffs
Sun May 29 22:00:50 2005 UTC (21 years, 5 months ago) by christos
Branches: MAIN
Branch point for: yamt-lazymbuf
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +68 -68 lines
- Sprinkle const
- Avoid variable shadowing.
- Eliminate some caddr_t abuse.

Revision 1.212.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:29:16 2005 UTC (21 years, 6 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.212: preferred, colored; next MAIN 1.213: preferred, colored
Changes since revision 1.212: +57 -62 lines
sync with -current

Revision 1.222: download - view: text, markup, annotated - select for diffs
Mon Apr 25 17:52:30 2005 UTC (21 years, 6 months ago) by drochner
Branches: MAIN
CVS tags: kent-audio2-base
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +4 -5 lines
fix more SSD_RCODE_VALID misuse introduced in cleanup

Revision 1.220.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 6 11:56:50 2005 UTC (21 years, 7 months ago) by tron
Branches: netbsd-3
CVS tags: netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +3 -9 lines
Pull up revision 1.221 (requested by yamt in ticket #112):
introduce a function to drain bufq and use it where appropriate.

Revision 1.185.2.12: download - view: text, markup, annotated - select for diffs
Fri Apr 1 14:30:33 2005 UTC (21 years, 7 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.185.2.11: preferred, colored
Changes since revision 1.185.2.11: +3 -9 lines
Sync with HEAD.

Revision 1.221: download - view: text, markup, annotated - select for diffs
Thu Mar 31 11:28:53 2005 UTC (21 years, 7 months ago) by yamt
Branches: MAIN
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +3 -9 lines
introduce a function to drain bufq and use it where appropriate.

Revision 1.212.4.2: download - view: text, markup, annotated - select for diffs
Sat Mar 19 08:35:47 2005 UTC (21 years, 8 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.212.4.1: preferred, colored; branchpoint 1.212: preferred, colored; next MAIN 1.213: preferred, colored
Changes since revision 1.212.4.1: +48 -47 lines
sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.185.2.11: download - view: text, markup, annotated - select for diffs
Fri Mar 4 16:50:32 2005 UTC (21 years, 8 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.185.2.10: preferred, colored
Changes since revision 1.185.2.10: +48 -47 lines
Sync with HEAD.

Hi Perry!

Revision 1.220: download - view: text, markup, annotated - select for diffs
Sun Feb 27 00:27:48 2005 UTC (21 years, 8 months ago) by perry
Branches: MAIN
CVS tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +11 -11 lines
nuke trailing whitespace

Revision 1.219: download - view: text, markup, annotated - select for diffs
Mon Feb 21 00:29:07 2005 UTC (21 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +39 -38 lines
Part 1 of a cleanup pass over the SCSI subsystem.  The aim is to name
everything "scsi_*", since we really are talking about the SCSI command
set, ATAPI transport not withstanding.  Improve the names of many structures,
and prepend "SCSI_" onto all SCSI command opcodes.  Place items described
by the SCSI Primary Commands document into scsi_spc.h.

Revision 1.212.4.1: download - view: text, markup, annotated - select for diffs
Sat Feb 12 18:17:50 2005 UTC (21 years, 9 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +11 -10 lines
sync with head.

Revision 1.185.2.10: download - view: text, markup, annotated - select for diffs
Fri Feb 4 11:47:23 2005 UTC (21 years, 9 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.185.2.9: preferred, colored
Changes since revision 1.185.2.9: +11 -10 lines
Sync with HEAD.

Revision 1.218: download - view: text, markup, annotated - select for diffs
Tue Feb 1 00:19:34 2005 UTC (21 years, 9 months ago) by reinoud
Branches: MAIN
CVS tags: yamt-km-base2
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +34 -34 lines
Backing out changes to clean up scsipi. I was pointed out there were
problems i hadn't seen. To prevent lossage i'd decided to back off all
changes and let them be reviewed on tech-kern.

Revision 1.217: download - view: text, markup, annotated - select for diffs
Mon Jan 31 23:39:02 2005 UTC (21 years, 9 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +12 -12 lines
Fix LP64 problems introduced by my u_long->uint32_t conversion.

Revision 1.216: download - view: text, markup, annotated - select for diffs
Mon Jan 31 23:06:41 2005 UTC (21 years, 9 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +32 -32 lines
Part of the cleanup of sys/scsipi's use of types; rename all u_int* to
uint* and change the u_long's to uint32_t's where possible. Note that the
iocl definitions/hooks have to be ulong (or u_long) or they'll bomb out.

Revision 1.215: download - view: text, markup, annotated - select for diffs
Mon Jan 31 21:13:16 2005 UTC (21 years, 9 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +5 -5 lines
As part of cleaning up sys/scsipi, replace all u_char by uint8_t and
replace all `short' with int16_t.

Revision 1.214: download - view: text, markup, annotated - select for diffs
Sun Jan 30 23:42:58 2005 UTC (21 years, 9 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +2 -2 lines
As in revision 1.213, not all information is returned in read-TOC format 0. In order to add a new generic read-toc ioctl, i renamed the origional to _f0 to indicate its only format 0. The routines can then be changed one at a time to the new generic calling. This patch fixes two calls i'd overseen.... silly me forgot to recompile :(

Revision 1.213: download - view: text, markup, annotated - select for diffs
Sun Jan 30 23:39:42 2005 UTC (21 years, 9 months ago) by reinoud
Branches: MAIN
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +9 -8 lines
The code asumes all programs want to know is TOC response format 0. Support
for TOC response format 1 and 2 are mandatory on CD/DVD too and provide
more information.

Next an IOCTL needs to be implemented that can read all TOC formats in a
generic way. This is pending.

Revision 1.185.2.9: download - view: text, markup, annotated - select for diffs
Sat Dec 18 09:32:21 2004 UTC (21 years, 11 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.185.2.8: preferred, colored
Changes since revision 1.185.2.8: +6 -6 lines
Sync with HEAD.

Revision 1.212: download - view: text, markup, annotated - select for diffs
Tue Dec 7 23:07:31 2004 UTC (21 years, 11 months ago) by thorpej
Branches: MAIN
CVS tags: yamt-km-base, kent-audio1-beforemerge
Branch point for: yamt-km, kent-audio2
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +6 -6 lines
USe more appropriate macro/struct names for READ/WRITE (6) and
READ/WRITE (10).

Revision 1.185.2.8: download - view: text, markup, annotated - select for diffs
Tue Nov 2 07:52:46 2004 UTC (22 years ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.185.2.7: preferred, colored
Changes since revision 1.185.2.7: +3 -2 lines
Sync with HEAD.

Revision 1.211: download - view: text, markup, annotated - select for diffs
Thu Oct 28 07:07:45 2004 UTC (22 years ago) by yamt
Branches: MAIN
CVS tags: kent-audio1-base, kent-audio1
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +3 -2 lines
move buffer queue related stuffs from buf.h to their own header, bufq.h.

Revision 1.185.2.7: download - view: text, markup, annotated - select for diffs
Tue Oct 19 15:57:27 2004 UTC (22 years, 1 month ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.185.2.6: preferred, colored
Changes since revision 1.185.2.6: +3 -3 lines
Sync with HEAD

Revision 1.210: download - view: text, markup, annotated - select for diffs
Sun Sep 26 09:00:37 2004 UTC (22 years, 1 month ago) by dogcow
Branches: MAIN
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +3 -3 lines
Fix debug message output args to match yamt's src/sys/sys/buf.h changes.

Revision 1.185.2.6: download - view: text, markup, annotated - select for diffs
Tue Sep 21 13:33:21 2004 UTC (22 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.185.2.5: preferred, colored
Changes since revision 1.185.2.5: +6 -6 lines
Fix the sync with head I botched.

Revision 1.185.2.5: download - view: text, markup, annotated - select for diffs
Sat Sep 18 14:51:24 2004 UTC (22 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.185.2.4: preferred, colored
Changes since revision 1.185.2.4: +113 -133 lines
Sync with HEAD.

Revision 1.209: download - view: text, markup, annotated - select for diffs
Sat Sep 18 00:08:16 2004 UTC (22 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +64 -65 lines
Standardize some variable names and the calling pattern for scsipi_command().
Use void pointer casts.

Revision 1.208: download - view: text, markup, annotated - select for diffs
Fri Sep 17 23:43:17 2004 UTC (22 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +25 -25 lines
Remove the "xfer" argument to scsipi_command().

Revision 1.207: download - view: text, markup, annotated - select for diffs
Fri Sep 17 23:35:13 2004 UTC (22 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +3 -5 lines
In places where we've already called scsipi_make_xs(), call scsipi_execute_xs()
directly rather than going through scsipi_command().

Revision 1.206: download - view: text, markup, annotated - select for diffs
Fri Sep 17 23:10:50 2004 UTC (22 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +34 -58 lines
Do not manipulate xs->bp in "generic" code -- do it only in the psw_done
routine.  As part of this, pass down our pre-parsed error code -- though this
interface will probably change later to accomodate better error handling.

Revision 1.200.2.2: download - view: text, markup, annotated - select for diffs
Sat Sep 11 12:48:58 2004 UTC (22 years, 2 months ago) by he
Branches: netbsd-2-0
CVS tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2
Diff to: previous 1.200.2.1: preferred, colored; branchpoint 1.200: preferred, colored; next MAIN 1.201: preferred, colored
Changes since revision 1.200.2.1: +84 -43 lines
Pull up revisions 1.203-1.205 (via patch, requested by bouyer in ticket #837):
  Improve handling of memory shortage, to fix problems like:
    sd3(mpt0:0:1:0): unable to allocate scsipi_xfer
    sd3: not queued, error 12
  The theory is that other consumers of pool memory is causing
  this memory shortage in certain somewhat hard to reproduce
  situations.
  This is done by giving scsipi_command an extra argument to
  optionally pass a preallocated scsipi_xfer, and allocating a
  scsipi_xfer before dequeueing a buffer in the various *start()
  functions.  If the allocation of a scsipi_xfer fails, schedule
  a callout for delayed invocation of the start function.  Also
  reserve one page for scsipi_xfer structs, to ensure that we will
  eventually have some available once pending commands complete.
  Should fix PR#25670.

Revision 1.205: download - view: text, markup, annotated - select for diffs
Thu Sep 9 19:35:30 2004 UTC (22 years, 2 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +39 -32 lines
Make the xxstart() functions reentrant again, as some drivers HBA can call
scsipi_done() from their scsipi_request().
For this, add a struct scsipi_xfer * argument to scsipi_command().
If not NULL scsipi_command() will use this to enqueue this xfer, otherwise
it'll try to allocate a new one. This scsipi_xfer has to be allocated
and initialised by scsipi_make_xs() or equivalent.
In xxstart(), allocate a scsipi_xfer using scsipi_make_xs(), and if not NULL,
dequeue the buffer before calling scsipi_command(). This makes sure that
scsipi_command() will not fail, and also makes sure that xxstart() won't
be called again between the BUFQ_PEEK() and BUFQ_GET().

Fix "dequeued wrong buf" panics reported by Juergen Hannken-Illjes in
private mail and Andreas Wrede on current-users@.
Thanks to Jason Thorpe and Chuck Silver for review, and Andreas Wrede for
testing the patch.

Revision 1.204: download - view: text, markup, annotated - select for diffs
Mon Sep 6 20:38:14 2004 UTC (22 years, 2 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +3 -3 lines
Fix comment: xxstart() can also be called from xxrestart()

Revision 1.185.2.4: download - view: text, markup, annotated - select for diffs
Fri Sep 3 12:45:39 2004 UTC (22 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.185.2.3: preferred, colored
Changes since revision 1.185.2.3: +49 -15 lines
Sync with HEAD

Revision 1.203: download - view: text, markup, annotated - select for diffs
Fri Aug 27 20:37:28 2004 UTC (22 years, 2 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +49 -15 lines
Improve handling of memory shortage, to fix problems like:
sd3(mpt0:0:1:0): unable to allocate scsipi_xfer
sd3: not queued, error 12
Havard Eidnes's analysis of this problem is that the scsipi_xfer pool is
competing for resources with other pools, including the the inode and vnode
pools which can grow quite large.

*_scsipi_cmd(): don't biodone the buffer if scsipi_make_xs() fails, let the
   caller deal with the problem
start function of block devices drivers: dequeue the buffer after the
   scsipi_command() call. If scsipi_command() fails with ENOMEM don't dequeue
   the buffer, and schedule a callout to call the start function after
   some delay.
scsipi_init(): prime the scsipi_xfer_pool with one page. This ensure that
   there is always some scsipi_xfer to play with. If scsipi_command() fails
   because of pool_get(), we're sure there will be resources available later,
   when the pending commands have completed.

Reviewed by Jason Thorpe and Havard Eidnes.
Todo: remove the "unable to allocate scsipi_xfer" and "not queued, error %d"
printfs, but I choose to keep them for now, to help make sure the code does
what it should.

Revision 1.185.2.3: download - view: text, markup, annotated - select for diffs
Wed Aug 25 06:58:43 2004 UTC (22 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.185.2.2: preferred, colored
Changes since revision 1.185.2.2: +162 -265 lines
Sync with HEAD.

Revision 1.202: download - view: text, markup, annotated - select for diffs
Sat Aug 21 17:40:25 2004 UTC (22 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +162 -265 lines
Use ANSI function decls and make use of static.

Revision 1.185.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:51:12 2004 UTC (22 years, 3 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.185.2.1: preferred, colored
Changes since revision 1.185.2.1: +446 -84 lines
Sync with HEAD

Revision 1.200.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 27 18:50:21 2004 UTC (22 years, 6 months ago) by jdc
Branches: netbsd-2-0
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +77 -25 lines
Pull up revision 1.201 (requested by pk in ticket #186)

Some older devices do not understand the `disable block descriptor' bit in
the mode sense request. So fall back on mode sense data including a block
descriptor section.

See also sd.c rev. 1.214.  Again: should we bother trying DBD at all?

Revision 1.201: download - view: text, markup, annotated - select for diffs
Sat Apr 24 09:26:14 2004 UTC (22 years, 6 months ago) by pk
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +77 -25 lines
Some older devices do not understand the `disable block descriptor' bit in
the mode sense request. So fall back on mode sense data including a block
descriptor section.

See also sd.c rev. 1.214.  Again: should we bother trying DBD at all?

Revision 1.200: download - view: text, markup, annotated - select for diffs
Sun Feb 22 00:26:43 2004 UTC (22 years, 8 months ago) by enami
Branches: MAIN
CVS tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +3 -3 lines
Backout an obvious bug introduced in rev. 1.145.

Revision 1.199: download - view: text, markup, annotated - select for diffs
Sat Jan 10 14:39:50 2004 UTC (22 years, 10 months ago) by yamt
Branches: MAIN
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +5 -2 lines
store a i/o priority hint in struct buf for buffer queue discipline.

Revision 1.198: download - view: text, markup, annotated - select for diffs
Mon Nov 10 08:51:52 2003 UTC (23 years ago) by wiz
Branches: MAIN
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +4 -4 lines
Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.

Revision 1.197: download - view: text, markup, annotated - select for diffs
Thu Sep 18 00:06:32 2003 UTC (23 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +3 -3 lines
Merge the geometry and cache handling code for all direct access and optical
devices, as it's general to all SCSI MMC devices.  In the process, remove
PQUIRK_NO_FLEX_PAGE.

Revision 1.196: download - view: text, markup, annotated - select for diffs
Sat Sep 13 15:49:04 2003 UTC (23 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +3 -3 lines
Don't be silent if there is no media present.

Revision 1.195: download - view: text, markup, annotated - select for diffs
Sat Sep 13 14:44:50 2003 UTC (23 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +15 -11 lines
Make sure the "raw partition" can always be opened again.

Revision 1.194: download - view: text, markup, annotated - select for diffs
Tue Sep 9 02:43:34 2003 UTC (23 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +4 -4 lines
In the test for whether to start the unit, I used the wrong error code.
ENODEV is only returned when we get "medium not present," which we can fail
immediately on.  All other "not ready" cases return EIO.

Revision 1.193: download - view: text, markup, annotated - select for diffs
Mon Sep 8 23:44:29 2003 UTC (23 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +5 -5 lines
Oops.  Fix a typo in cd_mode_select().

Revision 1.192: download - view: text, markup, annotated - select for diffs
Mon Sep 8 18:51:34 2003 UTC (23 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +28 -33 lines
Do a START UNIT only if the TEST UNIT READY reports that the device is not
ready.  This avoids gratuitously starting the motor on floppy and CD-ROM
drives, and eliminates the need for the audio playing test in cdopen().

Therefore, also remove PQUIRK_NOSTARTUNIT.

Revision 1.191: download - view: text, markup, annotated - select for diffs
Mon Sep 8 16:16:43 2003 UTC (23 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +51 -70 lines
Attempt to deal with Martin's weirdass Sun drive by setting the mode sense
allocation length a little more precisely -- add the space for the header in
cd_mode_sense().  Also delete the XS_CTL_SILENT, since we really do want to
see errors.

Lastly, add a similar wrapper for mode select, simplifying the callers
slightly.

Revision 1.190: download - view: text, markup, annotated - select for diffs
Mon Sep 8 01:56:33 2003 UTC (23 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +57 -19 lines
Eliminate the separate ATAPI and SCSI attachments for "cd".

Revision 1.189: download - view: text, markup, annotated - select for diffs
Mon Sep 8 01:13:04 2003 UTC (23 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +5 -9 lines
Nuke some printf()s.

Revision 1.188: download - view: text, markup, annotated - select for diffs
Sun Sep 7 22:11:23 2003 UTC (23 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +324 -41 lines
Set PQUIRK_ONLYBIG in the wdc-atapi frontend, obviating the need to ever test
the "bus type" for this.

Merge all the code in the SCSI and ATAPI backends for "cd" devices.  All of
the mode page handling and whatnot is general to SCSI MMC devices, and should
never have been separated to begin with.  This fixes a variety of problems,
and adds load/unload support for SCSI-attached devices.

Revision 1.187: download - view: text, markup, annotated - select for diffs
Fri Jul 18 14:33:54 2003 UTC (23 years, 4 months ago) by wiz
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +3 -3 lines
Add a cast to avoid an integer overflow.
Fixes playing (at least some) DVDs.
Patch from Tsubai Masanari (tsubai at iri.co.jp) -- thanks a lot!

Revision 1.186: download - view: text, markup, annotated - select for diffs
Thu Jul 10 18:18:40 2003 UTC (23 years, 4 months ago) by martin
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +12 -2 lines
If a CD drive reports != 2048 byte block size, try to change it into
2048 byte mode. Fixes PR kern/22090.
Reviewed by Manuel Bouyer.

Revision 1.185.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 2 15:26:17 2003 UTC (23 years, 4 months ago) by darrenr
Branches: ktrace-lwp
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +9 -9 lines
Apply the aborted ktrace-lwp changes to a specific branch.  This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it.  This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.

Revision 1.185: download - view: text, markup, annotated - select for diffs
Sun Jun 29 22:30:37 2003 UTC (23 years, 4 months ago) by fvdl
Branches: MAIN
Branch point for: ktrace-lwp
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +7 -7 lines
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.184: download - view: text, markup, annotated - select for diffs
Sat Jun 28 14:21:43 2003 UTC (23 years, 4 months ago) by darrenr
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +9 -9 lines
Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

Revision 1.183: download - view: text, markup, annotated - select for diffs
Sat May 10 23:12:47 2003 UTC (23 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +3 -3 lines
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.

Revision 1.182: download - view: text, markup, annotated - select for diffs
Fri May 2 08:45:29 2003 UTC (23 years, 6 months ago) by dsl
Branches: MAIN
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +3 -3 lines
Change return type of readdisklabel() to const char *
I hope I've found all the correct places!

Revision 1.181: download - view: text, markup, annotated - select for diffs
Thu Apr 3 22:18:24 2003 UTC (23 years, 7 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +13 -5 lines
Check RAW_PART against the media size instead of the disklabel.
Add the media size in 512-byte sectors to the softc, to avoid
some 64 bit computations. Bump the capacity stored in softcs
for disks to 64 bits.

Revision 1.180: download - view: text, markup, annotated - select for diffs
Thu Mar 20 05:49:21 2003 UTC (23 years, 8 months ago) by dbj
Branches: MAIN
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +3 -3 lines
use PRId64 to printf bp->b_blkno, which is of type daddr_t

Revision 1.179: download - view: text, markup, annotated - select for diffs
Tue Feb 25 20:35:37 2003 UTC (23 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +4 -5 lines
Add a new BUF_INIT() macro which initializes b_dep and b_interlock, and
use it.  This fixes a few places where either b_dep or b_interlock were
not properly initialized.

Revision 1.178: download - view: text, markup, annotated - select for diffs
Wed Feb 5 21:38:41 2003 UTC (23 years, 9 months ago) by pk
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +3 -2 lines
Make the buffer cache code MP-safe.

Revision 1.177: download - view: text, markup, annotated - select for diffs
Mon Feb 3 23:50:59 2003 UTC (23 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +3 -3 lines
Test callout_pending(), not callout_active(), and eliminate now-unnecessary
callout_deactivate() calls.

Revision 1.176: download - view: text, markup, annotated - select for diffs
Thu Jan 23 00:00:33 2003 UTC (23 years, 9 months ago) by bad
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +3 -4 lines
Being able to make image backups of your whole disk, not to mention not
causing certain ata disks to lock up by reading beyond the last block,
beats catering to broken devices.

bounds_check_with_label() RAW_PART too.

Revision 1.175: download - view: text, markup, annotated - select for diffs
Mon Jan 20 05:30:09 2003 UTC (23 years, 10 months ago) by simonb
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +3 -3 lines
The Double-Semi-Colon Police.

Revision 1.144.2.13: download - view: text, markup, annotated - select for diffs
Wed Jan 15 18:44:23 2003 UTC (23 years, 10 months ago) by thorpej
Branches: nathanw_sa
CVS tags: nathanw_sa_end
Diff to: previous 1.144.2.12: preferred, colored; branchpoint 1.144: preferred, colored; next MAIN 1.145: preferred, colored
Changes since revision 1.144.2.12: +7 -7 lines
Sync with HEAD.

Revision 1.174: download - view: text, markup, annotated - select for diffs
Mon Jan 13 03:32:56 2003 UTC (23 years, 10 months ago) by toshii
Branches: MAIN
CVS tags: nathanw_sa_before_merge, nathanw_sa_base
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +7 -7 lines
Use the correct byte positions to read data returned by DVD_LU_SEND_RPC_STATE.

Revision 1.144.2.12: download - view: text, markup, annotated - select for diffs
Thu Dec 19 00:48:17 2002 UTC (23 years, 11 months ago) by thorpej
Branches: nathanw_sa
Diff to: previous 1.144.2.11: preferred, colored; branchpoint 1.144: preferred, colored
Changes since revision 1.144.2.11: +64 -40 lines
Sync with HEAD.

Revision 1.173: download - view: text, markup, annotated - select for diffs
Sun Dec 15 17:48:14 2002 UTC (23 years, 11 months ago) by jmcneill
Branches: MAIN
CVS tags: gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +5 -6 lines
Another sizeof -> 4 + 2048 fix for dvd_read_manufact after malloc changes

Revision 1.172: download - view: text, markup, annotated - select for diffs
Sun Dec 15 17:43:50 2002 UTC (23 years, 11 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +5 -6 lines
In dvd_read_disckey, sizeof(buf) is no longer '4 + 2048' after the
malloc change. Replace 'sizeof(buf)' with '4 + 2048' -- this makes
dvd_read_disckey work properly again.

Revision 1.171: download - view: text, markup, annotated - select for diffs
Sun Dec 15 01:55:44 2002 UTC (23 years, 11 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +60 -34 lines
Don't waste too much kernel stack space on (infrequent) ioctl operations,
use malloc instead for temp space.

Revision 1.144.2.11: download - view: text, markup, annotated - select for diffs
Mon Nov 11 22:12:07 2002 UTC (24 years ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.144.2.10: preferred, colored; branchpoint 1.144: preferred, colored
Changes since revision 1.144.2.10: +6 -5 lines
Catch up to -current

Revision 1.170: download - view: text, markup, annotated - select for diffs
Sat Nov 9 18:58:26 2002 UTC (24 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +4 -4 lines
Fix signed/unsigned comparison warnings.

Revision 1.169: download - view: text, markup, annotated - select for diffs
Fri Nov 1 11:31:59 2002 UTC (24 years ago) by mrg
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +5 -4 lines
implement separate read/write disk statistics:
	- disk_unbusy() gets a new parameter to tell the IO direction.
	- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
	when processing hw.diskstats, add the read&write bytes/transfers for
	the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail.  however, the next time this is
change it will not fail again.

this is just the kernel portion.

Revision 1.168: download - view: text, markup, annotated - select for diffs
Wed Oct 23 09:13:44 2002 UTC (24 years ago) by jdolecek
Branches: MAIN
CVS tags: kqueue-aftermerge
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +3 -3 lines
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

Revision 1.144.2.10: download - view: text, markup, annotated - select for diffs
Fri Oct 18 02:44:13 2002 UTC (24 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.144.2.9: preferred, colored; branchpoint 1.144: preferred, colored
Changes since revision 1.144.2.9: +0 -4 lines
Catch up to -current.

Revision 1.151.2.7: download - view: text, markup, annotated - select for diffs
Thu Oct 10 18:42:12 2002 UTC (24 years, 1 month ago) by jdolecek
Branches: kqueue
Diff to: previous 1.151.2.6: preferred, colored; next MAIN 1.152: preferred, colored
Changes since revision 1.151.2.6: +22 -12 lines
sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.167: download - view: text, markup, annotated - select for diffs
Wed Sep 18 01:46:23 2002 UTC (24 years, 2 months ago) by chs
Branches: MAIN
CVS tags: kqueue-beforemerge, kqueue-base
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +2 -6 lines
remove all vesitages of dk_establish().

Revision 1.144.2.9: download - view: text, markup, annotated - select for diffs
Tue Sep 17 21:21:11 2002 UTC (24 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.144.2.8: preferred, colored; branchpoint 1.144: preferred, colored
Changes since revision 1.144.2.8: +21 -11 lines
Catch up to -current.

Revision 1.166: download - view: text, markup, annotated - select for diffs
Fri Sep 6 13:18:43 2002 UTC (24 years, 2 months ago) by gehenna
Branches: MAIN
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +22 -8 lines
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.

Revision 1.151.2.6: download - view: text, markup, annotated - select for diffs
Fri Sep 6 08:46:20 2002 UTC (24 years, 2 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.151.2.5: preferred, colored
Changes since revision 1.151.2.5: +10 -14 lines
sync kqueue branch with HEAD

Revision 1.162.2.5: download - view: text, markup, annotated - select for diffs
Sat Aug 31 16:38:20 2002 UTC (24 years, 2 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.162.2.4: preferred, colored; branchpoint 1.162: preferred, colored; next MAIN 1.163: preferred, colored
Changes since revision 1.162.2.4: +3 -7 lines
catch up with -current.

Revision 1.165: download - view: text, markup, annotated - select for diffs
Fri Aug 30 15:43:36 2002 UTC (24 years, 2 months ago) by hannken
Branches: MAIN
CVS tags: gehenna-devsw-base
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +3 -7 lines
Remove the old device buffer queue interface.

Approved by: Jason R. Thorpe <thorpej@wasabisystems.com>

Revision 1.162.2.4: download - view: text, markup, annotated - select for diffs
Thu Aug 29 05:22:53 2002 UTC (24 years, 2 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.162.2.3: preferred, colored; branchpoint 1.162: preferred, colored
Changes since revision 1.162.2.3: +9 -9 lines
catch up with -current.

Revision 1.144.2.8: download - view: text, markup, annotated - select for diffs
Thu Aug 1 02:45:41 2002 UTC (24 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.144.2.7: preferred, colored; branchpoint 1.144: preferred, colored
Changes since revision 1.144.2.7: +9 -9 lines
Catch up to -current.

Revision 1.164: download - view: text, markup, annotated - select for diffs
Mon Jul 22 14:59:43 2002 UTC (24 years, 4 months ago) by hannken
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +9 -9 lines
Convert to new device buffer queue interface.

Revision 1.141.2.3: download - view: text, markup, annotated - select for diffs
Wed Jun 26 17:03:15 2002 UTC (24 years, 4 months ago) by he
Branches: netbsd-1-5
CVS tags: netbsd-1-5-PATCH003
Diff to: previous 1.141.2.2: preferred, colored; branchpoint 1.141: preferred, colored; next MAIN 1.142: preferred, colored
Changes since revision 1.141.2.2: +14 -14 lines
Pull up revision 1.150 (via patch, requested by dillo):
  Make DVD ioctls use the right size CDB (16 instead of 12).  Fixes
  PR#12991.

Revision 1.151.2.5: download - view: text, markup, annotated - select for diffs
Sun Jun 23 17:48:43 2002 UTC (24 years, 4 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.151.2.4: preferred, colored
Changes since revision 1.151.2.4: +50 -25 lines
catch up with -current on kqueue branch

Revision 1.144.2.7: download - view: text, markup, annotated - select for diffs
Thu Jun 20 03:46:33 2002 UTC (24 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.144.2.6: preferred, colored; branchpoint 1.144: preferred, colored
Changes since revision 1.144.2.6: +50 -25 lines
Catch up to -current.

Revision 1.162.2.3: download - view: text, markup, annotated - select for diffs
Fri May 31 02:19:53 2002 UTC (24 years, 5 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.162.2.2: preferred, colored; branchpoint 1.162: preferred, colored
Changes since revision 1.162.2.2: +2 -19 lines
fix conflicts.

Revision 1.162.2.2: download - view: text, markup, annotated - select for diffs
Thu May 30 14:47:15 2002 UTC (24 years, 5 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.162.2.1: preferred, colored; branchpoint 1.162: preferred, colored
Changes since revision 1.162.2.1: +50 -9 lines
Catch up with -current.

Revision 1.163: download - view: text, markup, annotated - select for diffs
Mon May 27 16:42:30 2002 UTC (24 years, 5 months ago) by drochner
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +48 -24 lines
put multisession offset code into a separate function and initialize
the p_cdsession field of partition 'a' in the default disklabel

Revision 1.162.2.1: download - view: text, markup, annotated - select for diffs
Thu May 16 11:40:53 2002 UTC (24 years, 6 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +22 -8 lines
Add the block/character device switches.
Replace the direct-access to devsw table with calling devsw API.

Revision 1.162: download - view: text, markup, annotated - select for diffs
Sun May 5 15:16:31 2002 UTC (24 years, 6 months ago) by bouyer
Branches: MAIN
CVS tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Branch point for: gehenna-devsw
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +4 -3 lines
If periph->periph_callout is already active, don't freeze the periph again:
scispi_periph_timed_thaw() will be called only one time anyway.

Revision 1.151.2.4: download - view: text, markup, annotated - select for diffs
Thu Jan 10 19:58:16 2002 UTC (24 years, 10 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.151.2.3: preferred, colored
Changes since revision 1.151.2.3: +35 -4 lines
Sync kqueue branch with -current.

Revision 1.144.2.6: download - view: text, markup, annotated - select for diffs
Tue Jan 8 00:31:46 2002 UTC (24 years, 10 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.144.2.5: preferred, colored; branchpoint 1.144: preferred, colored
Changes since revision 1.144.2.5: +31 -3 lines
Catch up to -current.

Revision 1.161: download - view: text, markup, annotated - select for diffs
Sun Dec 9 22:56:10 2001 UTC (24 years, 11 months ago) by veego
Branches: MAIN
CVS tags: newlock-base, newlock, ifpoll-base, eeh-devprop-base, eeh-devprop
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +31 -2 lines
Support for dvd region code (RPC).

Revision 1.160: download - view: text, markup, annotated - select for diffs
Thu Nov 15 09:48:16 2001 UTC (25 years ago) by lukem
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +2 -3 lines
don't need <sys/types.h> when including <sys/param.h>

Revision 1.144.2.5: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:16:00 2001 UTC (25 years ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.144.2.4: preferred, colored; branchpoint 1.144: preferred, colored
Changes since revision 1.144.2.4: +4 -1 lines
Catch up to -current.

Revision 1.159: download - view: text, markup, annotated - select for diffs
Tue Nov 13 06:56:39 2001 UTC (25 years ago) by lukem
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +4 -1 lines
add RCSIDs

Revision 1.144.2.4: download - view: text, markup, annotated - select for diffs
Mon Oct 22 20:41:41 2001 UTC (25 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.144.2.3: preferred, colored; branchpoint 1.144: preferred, colored
Changes since revision 1.144.2.3: +3 -3 lines
Catch up to -current.

Revision 1.158: download - view: text, markup, annotated - select for diffs
Mon Oct 22 16:16:00 2001 UTC (25 years, 1 month ago) by bouyer
Branches: MAIN
CVS tags: thorpej-mips-cache-base, thorpej-mips-cache
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +3 -3 lines
We can't have XS_CTL_DATA_OUT and XS_CTL_DATA_IN at the same time.
Pointed out by Bernd Ernesti.

Revision 1.157.2.2: download - view: text, markup, annotated - select for diffs
Wed Sep 26 15:28:16 2001 UTC (25 years, 1 month ago) by fvdl
Branches: thorpej-devvp
Diff to: previous 1.157.2.1: preferred, colored; branchpoint 1.157: preferred, colored; next MAIN 1.158: preferred, colored
Changes since revision 1.157.2.1: +43 -21 lines
* add a VCLONED vnode flag that indicates a vnode representing a cloned
  device.
* rename REVOKEALL to REVOKEALIAS, and add a REVOKECLONE flag, to pass
  to VOP_REVOKE
* the revoke system call will revoke all aliases, as before, but not the
  clones
* vdevgone is called when detaching a device, so make it use REVOKECLONE
  to get rid of all clones as well
* clean up all uses of VOP_OPEN wrt. locking.
* add a few VOPS to spec_vnops that need to do something when it's a
  clone vnode (access and getattr)
* add a copy of the vnode vattr structure of the original 'master' vnode
  to the specinfo of a cloned vnode. could possibly redirect getattr to
  the 'master' vnode, but this has issues with revoke
* add a vdev_reassignvp function that disassociates a vnode from its
  original device, and reassociates it with the specified dev_t. to be
  used by cloning devices only, in case a new minor is allocated.
* change all direct references in drivers to v_devcookie and v_rdev
  to vdev_privdata(vp) and vdev_rdev(vp). for diagnostic purposes
  when debugging race conditions that still exist wrt. locking and
  revoking vnodes.
* make the locking state of a vnode consistent when passed to
  d_open and d_close (unlocked). locked would be better, but has
  some deadlock issues

Revision 1.144.2.3: download - view: text, markup, annotated - select for diffs
Fri Sep 21 22:36:12 2001 UTC (25 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.144.2.2: preferred, colored; branchpoint 1.144: preferred, colored
Changes since revision 1.144.2.2: +19 -32 lines
Catch up to -current.

Revision 1.151.2.3: download - view: text, markup, annotated - select for diffs
Thu Sep 13 01:16:08 2001 UTC (25 years, 2 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.151.2.2: preferred, colored
Changes since revision 1.151.2.2: +19 -32 lines
Update the kqueue branch to HEAD.

Revision 1.157.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 7 04:45:30 2001 UTC (25 years, 2 months ago) by thorpej
Branches: thorpej-devvp
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +41 -34 lines
Commit my "devvp" changes to the thorpej-devvp branch.  This
replaces the use of dev_t in most places with a struct vnode *.

This will form the basic infrastructure for real cloning device
support (besides being architecurally cleaner -- it'll be good
to get away from using numbers to represent objects).

Revision 1.157: download - view: text, markup, annotated - select for diffs
Sun Sep 2 13:11:53 2001 UTC (25 years, 2 months ago) by tsutsui
Branches: MAIN
CVS tags: thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +19 -32 lines
Use be16toh(), be32toh(), le16toh() and le32toh() rather than
ntohs(), ntohl() or homegrown bswap() functions.

XXX Does anyone use drives with PQUIRK_LITTLETOC on big endian machines?

Revision 1.151.2.2: download - view: text, markup, annotated - select for diffs
Sat Aug 25 06:16:32 2001 UTC (25 years, 2 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.151.2.1: preferred, colored
Changes since revision 1.151.2.1: +210 -20 lines
Merge Aug 24 -current into the kqueue branch.

Revision 1.144.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 24 00:10:42 2001 UTC (25 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.144.2.1: preferred, colored; branchpoint 1.144: preferred, colored
Changes since revision 1.144.2.1: +225 -31 lines
Catch up with -current.

Revision 1.156: download - view: text, markup, annotated - select for diffs
Mon Aug 20 15:45:10 2001 UTC (25 years, 3 months ago) by ad
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +17 -31 lines
Don't special case the retry for Media Changed... More later.

Revision 1.155: download - view: text, markup, annotated - select for diffs
Mon Aug 20 11:31:10 2001 UTC (25 years, 3 months ago) by ad
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +57 -33 lines
Two changes submitted by Sergey Svishchev <svs@ropnet.ru>:

- Don't send START UNIT upon open if the drive is playing audio (PR 11768).
- If we receive sense indicating that the media changed, retry (PR 8326).

Revision 1.154: download - view: text, markup, annotated - select for diffs
Wed Aug 15 22:21:01 2001 UTC (25 years, 3 months ago) by eeh
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +184 -4 lines
Add support for smaller sector sizes so we can mount ffs filesystems.

Revision 1.151.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 3 04:13:29 2001 UTC (25 years, 3 months ago) by lukem
Branches: kqueue
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +12 -12 lines
update to -current

Revision 1.153: download - view: text, markup, annotated - select for diffs
Wed Jul 18 18:25:41 2001 UTC (25 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +2 -2 lines
bcopy -> memcpy

Revision 1.152: download - view: text, markup, annotated - select for diffs
Wed Jul 18 18:21:04 2001 UTC (25 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +11 -11 lines
bzero -> memset

Revision 1.151: download - view: text, markup, annotated - select for diffs
Tue Jun 26 15:32:03 2001 UTC (25 years, 4 months ago) by bouyer
Branches: MAIN
Branch point for: kqueue
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +8 -4 lines
Add a XS_CTL_SILENT_NODEV flag: if the sense info is "not ready, medium
not present" don't print any message but still return ENODEV.
Use this in cd driver to allow open of character raw partition even if
the drive is empty (older drives fails at LOAD_UNLOAD time, newer
ones fail at TEST_UNIT_READY time).

Revision 1.144.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 21 20:05:43 2001 UTC (25 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +159 -129 lines
Catch up to -current.

Revision 1.150: download - view: text, markup, annotated - select for diffs
Sun May 20 21:07:58 2001 UTC (25 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +14 -14 lines
PR/12991: Dave Huang: DVD ioctls don't work because we send the wrong size
CDB (16 instead of 12).

Revision 1.149: download - view: text, markup, annotated - select for diffs
Thu May 17 20:02:56 2001 UTC (25 years, 6 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +2 -2 lines
SDEV_DB -> SCSIPI_DB

Revision 1.141.2.2: download - view: text, markup, annotated - select for diffs
Sun May 6 20:49:00 2001 UTC (25 years, 6 months ago) by he
Branches: netbsd-1-5
CVS tags: netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Diff to: previous 1.141.2.1: preferred, colored; branchpoint 1.141: preferred, colored
Changes since revision 1.141.2.1: +7 -5 lines
Pull up revision 1.148 (requested by fvdl):
  Compensate for the fact that after __HAVE_OLD_DISKLABEL,
  DISKMINOR(u,p) is no longer contiguous over ``p'', so ranges
  cannot be passed to vdevgone().

Revision 1.148: download - view: text, markup, annotated - select for diffs
Sun May 6 18:30:56 2001 UTC (25 years, 6 months ago) by drochner
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +7 -5 lines
Since __HAVE_OLD_DISKLABEL, DISKMINOR(u, p) isn't continuous over "p"
anymore. So we can't pass a range to vdevgone() but have to loop over the
partitions explicitely.
(otherwise the next device unit will be killed)

Revision 1.141.2.1: download - view: text, markup, annotated - select for diffs
Tue May 1 12:27:37 2001 UTC (25 years, 6 months ago) by he
Branches: netbsd-1-5
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +39 -2 lines
Pull up revisions 1.142-1.143 (requested by fvdl):
  Increase the number of BSD disklabel partitions on i386 to 16.

Revision 1.147: download - view: text, markup, annotated - select for diffs
Sat Apr 28 09:33:25 2001 UTC (25 years, 6 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +3 -1 lines
Don't forget to set XS_CTL_DATA_OUT (that was removed in previous).

Revision 1.146: download - view: text, markup, annotated - select for diffs
Sat Apr 28 04:11:31 2001 UTC (25 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +5 -4 lines
Use simple tags for read and write, unless B_ORDERED is set, in
which case we use an ordered tag.

Revision 1.145: download - view: text, markup, annotated - select for diffs
Wed Apr 25 17:53:38 2001 UTC (25 years, 6 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +150 -125 lines
Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
  ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
  to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
  peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
  recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
  scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
  (no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
  set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
  the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
  will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge

Revision 1.131.2.7: download - view: text, markup, annotated - select for diffs
Sat Apr 21 19:37:19 2001 UTC (25 years, 7 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.131.2.6: preferred, colored; next MAIN 1.132: preferred, colored
Changes since revision 1.131.2.6: +2 -2 lines
Get rid of references to sc_link/scsipi_link in debug or comments.

Revision 1.131.2.6: download - view: text, markup, annotated - select for diffs
Sun Feb 11 19:16:19 2001 UTC (25 years, 9 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.131.2.5: preferred, colored
Changes since revision 1.131.2.5: +42 -2 lines
Sync with HEAD.

Revision 1.144: download - view: text, markup, annotated - select for diffs
Fri Jan 19 22:47:46 2001 UTC (25 years, 10 months ago) by kenh
Branches: MAIN
CVS tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +41 -2 lines
Retry requests if the CD-ROM drive returns the sense code "Device in
Process of Becoming Ready".

Revision 1.131.2.5: download - view: text, markup, annotated - select for diffs
Thu Jan 18 09:23:34 2001 UTC (25 years, 10 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.131.2.4: preferred, colored
Changes since revision 1.131.2.4: +39 -2 lines
Sync with head (for UBC+NFS fixes, mostly).

Revision 1.143: download - view: text, markup, annotated - select for diffs
Mon Jan 8 02:03:48 2001 UTC (25 years, 10 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +3 -3 lines
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.

Revision 1.142: download - view: text, markup, annotated - select for diffs
Sun Jan 7 18:09:03 2001 UTC (25 years, 10 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +39 -2 lines
Adapt all disk devices in MI directories to handle ODIOC* calls
for ports that have bumped MAXPARTITIONS (and thus define
__HAVE_OLD_DISKLABEL).

Revision 1.131.2.4: download - view: text, markup, annotated - select for diffs
Mon Nov 20 09:59:23 2000 UTC (26 years ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.131.2.3: preferred, colored
Changes since revision 1.131.2.3: +365 -45 lines
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.

Main changes to the scsipi code itself:
- add a scsipi_channel->type to allow umass to attach to both atapibus and
  scsibus. Will die when IDE is converted from ata_atapi_attach to
  scsipi_channel/scsipi_adapter
- Add a chan_defquirks to scsipi_channel so that adapters can pass a default
  set of quirks to be set for each device attached
- add adapt_getgeom and adapt_accesschk callbacks

Revision 1.139.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 22 17:08:09 2000 UTC (26 years, 5 months ago) by minoura
Branches: minoura-xpg4dl
Diff to: previous 1.139: preferred, colored; next MAIN 1.140: preferred, colored
Changes since revision 1.139: +46 -29 lines
Sync w/ netbsd-1-5-base.

Revision 1.141: download - view: text, markup, annotated - select for diffs
Fri Jun 9 08:54:19 2000 UTC (26 years, 5 months ago) by enami
Branches: MAIN
CVS tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +44 -28 lines
Prevent a process being swapped out during I/O if the data buffer is
allocated on stack.  This potential problem is noticed by Noriyuki Soda
and the idea and sample code to fix is given by Jason R. Thorpe.

Revision 1.140: download - view: text, markup, annotated - select for diffs
Tue May 30 01:08:23 2000 UTC (26 years, 5 months ago) by augustss
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +3 -2 lines
Add a quirk, SDEV_ONLYBIG, which implies that the device cannot handle
the 6 byte versions of READ, WRITE, and MODE_SENSE.
This greatly simplifies the UFI (USB Floppy) handling.

Revision 1.139: download - view: text, markup, annotated - select for diffs
Tue May 16 05:45:52 2000 UTC (26 years, 6 months ago) by thorpej
Branches: MAIN
CVS tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +2 -2 lines
Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc.  Those
platforms should be changed to use device_register().  In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.

Revision 1.138: download - view: text, markup, annotated - select for diffs
Thu Mar 30 00:00:55 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +4 -4 lines
Get rid of register declarations.

Revision 1.137: download - view: text, markup, annotated - select for diffs
Mon Mar 13 23:52:36 2000 UTC (26 years, 8 months ago) by soren
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +2 -2 lines
Fix doubled 'the's in comments.

Revision 1.136: download - view: text, markup, annotated - select for diffs
Mon Feb 7 20:16:56 2000 UTC (26 years, 9 months ago) by thorpej
Branches: MAIN
CVS tags: chs-ubc2-newbase
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +25 -18 lines
Fix a bug in disksort_*() which caused non-optimal ordering when multiple
active partitions were on a single spindle.  Add a b_rawblkno member to
struct buf which contains the non-partition-relative block number to sort
by.

Revision 1.135: download - view: text, markup, annotated - select for diffs
Fri Jan 21 23:40:00 2000 UTC (26 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +8 -8 lines
Update for sys/buf.h/disksort_*() changes.

Revision 1.130.2.2: download - view: text, markup, annotated - select for diffs
Mon Dec 27 18:35:34 1999 UTC (26 years, 10 months ago) by wrstuden
Branches: wrstuden-devbsize
Diff to: previous 1.130.2.1: preferred, colored; next MAIN 1.131: preferred, colored
Changes since revision 1.130.2.1: +298 -2 lines
Pull up to last week's -current.

Revision 1.130.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 23:19:54 1999 UTC (26 years, 11 months ago) by wrstuden
Branches: wrstuden-devbsize
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +52 -12 lines
Initial commit of recent changes to make DEV_BSIZE go away.

Runs on i386, needs work on other arch's. Main kernel routines should be
fine, but a number of the stand programs need help.

cd, fd, ccd, wd, and sd have been updated. sd has been tested with non-512
byte block devices. vnd, raidframe, and lfs need work.

Non 2**n block support is automatic for LKM's and conditional for kernels
on "options NON_PO2_BLOCKS".

Revision 1.124.2.1.4.1: download - view: text, markup, annotated - select for diffs
Tue Nov 30 13:34:29 1999 UTC (26 years, 11 months ago) by itojun
Branches: kame
CVS tags: kame_141_19991130
Diff to: previous 1.124.2.1: preferred, colored; next MAIN 1.124.2.2: preferred, colored
Changes since revision 1.124.2.1: +3 -2 lines
bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code).  Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.

Revision 1.131.4.1: download - view: text, markup, annotated - select for diffs
Mon Nov 15 00:41:24 1999 UTC (27 years ago) by fvdl
Branches: fvdl-softdep
Diff to: previous 1.131: preferred, colored; next MAIN 1.132: preferred, colored
Changes since revision 1.131: +298 -2 lines
Sync with -current

Revision 1.134: download - view: text, markup, annotated - select for diffs
Wed Nov 3 20:50:18 1999 UTC (27 years ago) by matt
Branches: MAIN
CVS tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, fvdl-softdep-base
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +2 -2 lines
use __vax__ and __i386__ instead of vax and i386

Revision 1.131.2.3: download - view: text, markup, annotated - select for diffs
Mon Nov 1 22:54:18 1999 UTC (27 years ago) by thorpej
Branches: thorpej_scsipi
Diff to: previous 1.131.2.2: preferred, colored
Changes since revision 1.131.2.2: +17 -18 lines
Fixup the SC_DEBUG() stuff for the new world order.

Revision 1.133: download - view: text, markup, annotated - select for diffs
Sun Oct 31 14:03:16 1999 UTC (27 years ago) by mycroft
Branches: MAIN
CVS tags: comdex-fall-1999-base, comdex-fall-1999
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +4 -4 lines
Fix the size of start_sector, end_sector and end_sector_l0.  (I'm just going to
assume the Linux people will also fix this, since I reported it to them.)

Revision 1.132: download - view: text, markup, annotated - select for diffs
Fri Oct 29 15:02:57 1999 UTC (27 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +297 -1 lines
Emulate the Linux DVD_* ioctls(2).  This gets us 90% of the way to running the
LiViD DVD player.  (See forthcoming mail to current-users.)
XXX NOTE: We should do something to probe capabilities, rather than allowing
these ioctls on any device.

Revision 1.131.2.2: download - view: text, markup, annotated - select for diffs
Wed Oct 20 20:39:29 1999 UTC (27 years, 1 month ago) by thorpej
Branches: thorpej_scsipi
Diff to: previous 1.131.2.1: preferred, colored
Changes since revision 1.131.2.1: +1 -2 lines
Remove an unnecessary comment regarding XS_CTL_NOSLEEP.

Revision 1.131.2.1: download - view: text, markup, annotated - select for diffs
Tue Oct 19 17:39:27 1999 UTC (27 years, 1 month ago) by thorpej
Branches: thorpej_scsipi
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +109 -83 lines
Completely rewritten scsipi_xfer execution engine:
- All xfers are queued in the mid-layer, rather than doing so in an
  ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
  to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
  peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
  recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
  scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
  (no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
  set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
  the need to use buggy tag ID allocation schemes in many adapter drivers).

There is a lot more work to do, but this correctly functions for the most
part on several file servers I run.

Revision 1.131: download - view: text, markup, annotated - select for diffs
Sun Oct 17 09:44:48 1999 UTC (27 years, 1 month ago) by ragge
Branches: MAIN
Branch point for: thorpej_scsipi, fvdl-softdep
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +2 -2 lines
Don't call dk_establish() on vax either.

Revision 1.130: download - view: text, markup, annotated - select for diffs
Thu Sep 30 22:57:53 1999 UTC (27 years, 1 month ago) by thorpej
Branches: MAIN
Branch point for: wrstuden-devbsize
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +20 -18 lines
Cleanup the scsipi_xfer flags:
- `flags' is now gone, replaced with `xs_control' and `xs_status'.
- Massive cleanup of the control flags.  Now we explicitly say that
  a job is to complete asynchronously, rather than relying on side-effects,
  and use a new flag to now that device discovery is being performed.
- Do SCSI device discovery interrupt-driven.

Revision 1.129: download - view: text, markup, annotated - select for diffs
Thu Sep 23 11:04:33 1999 UTC (27 years, 2 months ago) by enami
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +79 -1 lines
Allow to detach wdc, atapibus, wd and cd.

Revision 1.128: download - view: text, markup, annotated - select for diffs
Sat Aug 7 02:51:51 1999 UTC (27 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +8 -8 lines
Increase several timeouts to 30s.

Revision 1.124.2.2: download - view: text, markup, annotated - select for diffs
Thu Jun 24 00:02:12 1999 UTC (27 years, 5 months ago) by perry
Branches: netbsd-1-4
CVS tags: netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001
Diff to: previous 1.124.2.1: preferred, colored; branchpoint 1.124: preferred, colored; next MAIN 1.125: preferred, colored
Changes since revision 1.124.2.1: +3 -2 lines
pullup 1.126->1.127 (bouyer)

Revision 1.124.2.1.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 21 01:19:09 1999 UTC (27 years, 5 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.124.2.1: preferred, colored; next MAIN 1.124.2.2: preferred, colored
Changes since revision 1.124.2.1: +11 -7 lines
Sync w/ -current.

Revision 1.127: download - view: text, markup, annotated - select for diffs
Thu May 27 11:19:04 1999 UTC (27 years, 5 months ago) by bouyer
Branches: MAIN
CVS tags: chs-ubc2-base
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +3 -2 lines
in cdclose(), ignore "media change" when calling scsipi_prevent(), after
a 'eject -l' some ATAPI drives report this instead of illegal request.

Revision 1.124.2.1: download - view: text, markup, annotated - select for diffs
Thu Apr 8 17:08:46 1999 UTC (27 years, 7 months ago) by bouyer
Branches: netbsd-1-4
CVS tags: netbsd-1-4-RELEASE, kame_14_19990705, kame_14_19990628
Branch point for: kame, chs-ubc2
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +2 -2 lines
Pull up 1.126 from trunk: add SCSI_IGNORE_NOT_READY to the flags for
CDIOCCLOSE, so if the drive tries to spin up after the clause and fails
because there's no media, eject(1) doesn't get ENODEV. Closes port-i386/7345.

Revision 1.126: download - view: text, markup, annotated - select for diffs
Thu Apr 8 16:12:31 1999 UTC (27 years, 7 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +2 -2 lines
Add SCSI_IGNORE_NOT_READY to the flags for CDIOCCLOSE: some devices will
attempt to spin up, and report an error if there's no CD. Fixes port-i386/7345.

Revision 1.125: download - view: text, markup, annotated - select for diffs
Mon Apr 5 19:19:34 1999 UTC (27 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +9 -6 lines
If scsipi_command() fails, always print out the error code.

Revision 1.124: download - view: text, markup, annotated - select for diffs
Sun Feb 28 17:14:57 1999 UTC (27 years, 8 months ago) by explorer
Branches: MAIN
CVS tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +3 -2 lines
Update to slightly altered rnd_attach_source() api

Revision 1.123: download - view: text, markup, annotated - select for diffs
Mon Feb 15 18:41:04 1999 UTC (27 years, 9 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +3 -2 lines
For CDIOCCLOSE, ignore media changes, as some drive seems to return this
info here.

Revision 1.122: download - view: text, markup, annotated - select for diffs
Wed Feb 10 12:29:50 1999 UTC (27 years, 9 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +5 -3 lines
Abort transfer if b_blkno is negative. Closes PR kern/5553 by Johan Danielsson.

Revision 1.121: download - view: text, markup, annotated - select for diffs
Mon Feb 8 16:33:18 1999 UTC (27 years, 9 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +25 -5 lines
Change DIOCEJECT to do what's needed to eject a device before the eject
command (unlock for sd and cd) if no other partitions are open, return
EBUSY otherwise. DIOCEJECT will have the old semantic if its argument is not
0. The old ioctl has been renamed to ODIOCEJECT for binary compatibility.

Revision 1.120: download - view: text, markup, annotated - select for diffs
Fri Jan 29 11:17:58 1999 UTC (27 years, 9 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +14 -6 lines
Return ENODEV instead of EIO when we are trying to open a device without media
in the drive. restrict "opening of empty drive" to character devices only
(reading a block device returns a short read instead of ENODEV, which can lead
to confusion).

Revision 1.119: download - view: text, markup, annotated - select for diffs
Tue Jan 26 13:59:44 1999 UTC (27 years, 9 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +57 -18 lines
Allows the raw partition to be open()'ed, even when scsipi_start() fails
(no media or other ...) so that we can always send ioctl's to the device.

Revision 1.107.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 18 06:12:22 1999 UTC (27 years, 10 months ago) by cgd
Branches: netbsd-1-3
Diff to: previous 1.107: preferred, colored; next MAIN 1.108: preferred, colored
Changes since revision 1.107: +42 -8 lines
pull up rev 1.118 from trunk (PR#6093).  (is)

Revision 1.118: download - view: text, markup, annotated - select for diffs
Mon Jan 4 15:32:08 1999 UTC (27 years, 10 months ago) by is
Branches: MAIN
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +42 -8 lines
Multisession-CD-Support, by Torsten Duwe <duwe@ns.lst.de>.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Tue Dec 8 00:18:46 1998 UTC (27 years, 11 months ago) by thorpej
Branches: MAIN
CVS tags: kenh-if-detach-base, kenh-if-detach
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +4 -2 lines
When closing, wait for pending xfers to drain before unlocking the door,
and wait again before deleting the reference to the adapter.

Revision 1.116: download - view: text, markup, annotated - select for diffs
Fri Nov 20 00:35:39 1998 UTC (28 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +15 -2 lines
Add adapter reference counting for SCSI and ATAPI devices.

Revision 1.115: download - view: text, markup, annotated - select for diffs
Mon Aug 17 00:49:01 1998 UTC (28 years, 3 months ago) by mycroft
Branches: MAIN
CVS tags: chs-ubc-base, chs-ubc
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +23 -16 lines
Assign my copyrights to TNF.

Revision 1.114: download - view: text, markup, annotated - select for diffs
Wed Aug 5 16:29:04 1998 UTC (28 years, 3 months ago) by drochner
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +14 -3 lines
Improve generation of default disklabels:
-store printable product ID in cd's and sd's softc, use it as "typename"
-for this, add a "destination buffer length" argument to scsipi_strvis()
-return ATAPI device type for ATAPI devices

Revision 1.113: download - view: text, markup, annotated - select for diffs
Mon Jul 13 12:04:29 1998 UTC (28 years, 4 months ago) by hpeyerl
Branches: MAIN
CVS tags: eeh-paddr_t-base, eeh-paddr_t
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +7 -1 lines
Add support for ATA CD changer devices like the NEC CDR-251.
Evidence of managerial coding removed by Victor T. Cleaner (thorpej)

Revision 1.112: download - view: text, markup, annotated - select for diffs
Mon Mar 16 04:17:53 1998 UTC (28 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +3 -1 lines
Implement CDIOCCLOSE.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Thu Jan 15 19:56:03 1998 UTC (28 years, 10 months ago) by cgd
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +3 -3 lines
move the 'cd_cd' declaration back up to where it was before
the config changes were made.  Though the nature of the declaration
had to change, there wasn't a reason to change its location.

Revision 1.110: download - view: text, markup, annotated - select for diffs
Thu Jan 15 02:21:31 1998 UTC (28 years, 10 months ago) by cgd
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +18 -17 lines
add support for an ATAPI attachment for 'sd'.
fix 'cd' driver's NCD_SCSI bogosity (was using testing wrong macro!)
clean up in various ways:
* make common atapi_mode_{sense,select}() functions.
* put ATAPI data structures in more sensible headers, split up by
  device type.
* include headers a bit more carefully.
* pass flags to attachment-specific cd functions, and use them.
* get rid of SCSI bits in scsipi_base.h's scsipi_make_xs(), move
  them into the correct place in scsi_base.c.
* fix minor typo in struct name in scsipiconf.h (which was apparently
  never used except in a #define later in the same file).
* use __attribute__ to force 4-byte alignment for xs command store,
  so that architectures trying to bus_space_write_multi_N() (where
  N > 1) that data to a controller won't lose.
* clean up a few comments in typos, and make a few #defines easier to
  understand/maintain.
* rename cd_link.h to cdvar.h (via repository copy).  This is exactly
  what a 'var' file is supposed to be.

Revision 1.109: download - view: text, markup, annotated - select for diffs
Mon Jan 12 09:49:11 1998 UTC (28 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +3 -5 lines
Adjust for changes to config.

Revision 1.108: download - view: text, markup, annotated - select for diffs
Tue Dec 2 03:57:54 1997 UTC (28 years, 11 months ago) by mikel
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +2 -2 lines
fix typo; from Dave Sainty in PR kern/4602

Revision 1.107: download - view: text, markup, annotated - select for diffs
Sat Oct 18 19:50:51 1997 UTC (29 years, 1 month ago) by thorpej
Branches: MAIN
CVS tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA
Branch point for: netbsd-1-3
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +11 -12 lines
Implement two macros, scsipi_command() and scsipi_command_direct(), and
use them to hide the structure of the function pointers we jump through
to issue a command.

Revision 1.101.2.4: download - view: text, markup, annotated - select for diffs
Tue Oct 14 10:24:47 1997 UTC (29 years, 1 month ago) by thorpej
Branches: marc-pcmcia
Diff to: previous 1.101.2.3: preferred, colored; branchpoint 1.101: preferred, colored; next MAIN 1.102: preferred, colored
Changes since revision 1.101.2.3: +212 -176 lines
Update marc-pcmcia branch from trunk.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Mon Oct 13 00:47:49 1997 UTC (29 years, 1 month ago) by explorer
Branches: MAIN
CVS tags: marc-pcmcia-base
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +9 -1 lines
o Make usage of /dev/random dependant on
  pseudo-device   rnd                     # /dev/random and in-kernel generator
  in config files.

o Add declaration to all architectures.

o Clean up copyright message in rnd.c, rnd.h, and rndpool.c to include
  that this code is derived in part from Ted Tyso's linux code.

Revision 1.105: download - view: text, markup, annotated - select for diffs
Fri Oct 10 01:09:03 1997 UTC (29 years, 1 month ago) by explorer
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +7 -2 lines
Add hooks to insert timing info into the random system

Revision 1.104: download - view: text, markup, annotated - select for diffs
Wed Oct 8 23:05:22 1997 UTC (29 years, 1 month ago) by thorpej
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +26 -11 lines
Implement DIOCGDEFLABEL.

Revision 1.103: download - view: text, markup, annotated - select for diffs
Wed Oct 1 01:18:44 1997 UTC (29 years, 1 month ago) by enami
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +173 -165 lines
Cosmetic changes to keep coding style consistency in this directory;

- Indent with tab of width 8.
- Use four column to indent continuation line.
- Fold long line if possible.
- Use return (xx) instead of return xx.
- Compare pointer against NULL instead of testing like boolean.
- Delete whitespace at the end of line.
- Delete whitespace in front of function call operator.
- Delete whitespace after cast.
- Dereference a pointer to function explicitly.
- Add an empty line after local variable declaration.
- Use NULL instead of (char *)0.
- Dont use block for single statement.

Revision 1.101.2.3: download - view: text, markup, annotated - select for diffs
Tue Sep 16 03:50:49 1997 UTC (29 years, 2 months ago) by thorpej
Branches: marc-pcmcia
Diff to: previous 1.101.2.2: preferred, colored; branchpoint 1.101: preferred, colored
Changes since revision 1.101.2.2: +8 -9 lines
Update marc-pcmcia branch from trunk.

Revision 1.102: download - view: text, markup, annotated - select for diffs
Tue Sep 9 09:07:43 1997 UTC (29 years, 2 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +8 -9 lines
Uses PLAY_MSF instead of PLAY for the CDIOCPLAYTRACKS ioctl. This avoid a int16
overflow in the PLAY cbd when the resquested track(s) are more than 65535
blocks long. Submitted by t-nkyma@tcp-ip.or.jp in PR kern/4092.

Revision 1.101.2.2: download - view: text, markup, annotated - select for diffs
Wed Aug 27 23:33:00 1997 UTC (29 years, 2 months ago) by thorpej
Branches: marc-pcmcia
Diff to: previous 1.101.2.1: preferred, colored; branchpoint 1.101: preferred, colored
Changes since revision 1.101.2.1: +1192 -0 lines
Update marc-pcmcia branch from trunk.

Revision 1.101.2.1
Wed Aug 27 11:26:19 1997 UTC (29 years, 2 months ago) by thorpej
Branches: marc-pcmcia
FILE REMOVED
Changes since revision 1.101: +0 -1192 lines
file cd.c was added on branch marc-pcmcia on 1997-08-27 23:33:00 +0000

Revision 1.101: download - view: text, markup, annotated - select for diffs
Wed Aug 27 11:26:19 1997 UTC (29 years, 2 months ago) by bouyer
Branches: MAIN
CVS tags: thorpej-signal-base, thorpej-signal
Branch point for: marc-pcmcia
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +277 -343 lines
Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.

Revision 1.100: download - view: text, markup, annotated - select for diffs
Wed Apr 2 02:29:30 1997 UTC (29 years, 7 months ago) by mycroft
Branches: MAIN
CVS tags: bouyer-scsipi
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +7 -10 lines
Push the buffer cleanup code into scsi_done(), and split it so that biodone()
is called *after* the driver `done' routine.  This fixes disk I/O statistics
on SCSI devices.

Also, calling the `done' routine with a `complete' argument of 0 and actually
having it do anything meaningful loses in at least 3 ways, so just nuke the
argument altogether and don't call it this way.  If the driver needs to do
some error handling, that's what `err_handler' is for.

Revision 1.99: download - view: text, markup, annotated - select for diffs
Sat Mar 29 21:37:55 1997 UTC (29 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +2 -2 lines
PR/3409: Koji Imada: cdsize() timeout too short for cd changers.

Revision 1.97.6.1: download - view: text, markup, annotated - select for diffs
Wed Mar 12 21:25:35 1997 UTC (29 years, 8 months ago) by is
Diff to: previous 1.97: preferred, colored; next MAIN 1.98: preferred, colored
Changes since revision 1.97: +2 -1 lines
Merge in changes from Trunk

Revision 1.98: download - view: text, markup, annotated - select for diffs
Fri Feb 21 23:03:25 1997 UTC (29 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +2 -1 lines
If posting an error condition because the media has been unloaded,
make sure to set the residual count to reflect that no data was
transfered.

From Naofumi HONDA / MINOURA Makoto, PR #3007.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Thu Dec 5 01:06:39 1996 UTC (29 years, 11 months ago) by cgd
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +11 -2 lines
update these so they compile whether or not __BROKEN_INDIRECT_CONFIG
is defined.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Sat Oct 12 23:23:13 1996 UTC (30 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +3 -3 lines
revert previous kprintf change

Revision 1.95: download - view: text, markup, annotated - select for diffs
Thu Oct 10 23:34:14 1996 UTC (30 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +3 -3 lines
printf -> kprintf, sprintf -> ksprintf

Revision 1.94: download - view: text, markup, annotated - select for diffs
Tue Aug 13 08:55:38 1996 UTC (30 years, 3 months ago) by explorer
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +2 -2 lines
be quiet about read_subchannel.  Some CD players use this to poll, and having
a screen filled with kernel messages isn't nice.  Closes pr kern/817

Revision 1.93: download - view: text, markup, annotated - select for diffs
Tue Aug 13 08:31:31 1996 UTC (30 years, 3 months ago) by explorer
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +4 -2 lines
Fix condition where disk_unbusy may not get called

Revision 1.92: download - view: text, markup, annotated - select for diffs
Sun May 5 19:52:50 1996 UTC (30 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +3 -3 lines
Cleanup the rest of the SCSIDEBUG printfs. From Bernd Ernesti.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Mon Apr 22 01:46:00 1996 UTC (30 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +1 -2 lines
remove include of <sys/cpu.h>

Revision 1.90: download - view: text, markup, annotated - select for diffs
Sat Mar 30 21:44:50 1996 UTC (30 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +2 -2 lines
Eliminate scsi_conf.h.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Fri Mar 29 14:50:12 1996 UTC (30 years, 7 months ago) by mrg
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +1 -3 lines
eliminate unused variables.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Wed Mar 27 01:11:41 1996 UTC (30 years, 7 months ago) by cgd
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +2 -2 lines
fix pasto: sdminphys -> cdminphys in comment.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Wed Mar 27 00:48:50 1996 UTC (30 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +2 -2 lines
SDUNIT -> CDUNIT in last.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Tue Mar 26 22:22:19 1996 UTC (30 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +5 -1 lines
Put back dk_establish() for now.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Tue Mar 26 20:32:06 1996 UTC (30 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +39 -10 lines
Increase *OUTSTANDING.
Remove old dk_establish() garbage.
Support the `ancient' bit in both drivers.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Tue Mar 19 03:05:15 1996 UTC (30 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +14 -35 lines
Define a full set of [234][bl]tol() and lto[234][bl]() conversion functions,
inlined.
Use sized types in protocol structures.
Make the definition of scsi_sense_data less ugly.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Sun Mar 17 00:59:41 1996 UTC (30 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +15 -11 lines
New device attachment scheme:

	- split softc size and match/attach out from cfdriver into
	  a new struct cfattach.

	- new "attach" directive for files.*.  May specify the name of
	  the cfattach structure, so that devices may be easily attached
	  to parents with different autoconfiguration semantics.

Revision 1.82: download - view: text, markup, annotated - select for diffs
Wed Feb 14 21:46:52 1996 UTC (30 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +93 -67 lines
scsi prototypes

Revision 1.76.2.1: download - view: text, markup, annotated - select for diffs
Sun Feb 4 05:44:41 1996 UTC (30 years, 9 months ago) by gwr
Diff to: previous 1.76: preferred, colored; next MAIN 1.77: preferred, colored
Changes since revision 1.76: +40 -26 lines
Pull in rev 1.78 (Jason's fix to use 6-byte command blocks).

Revision 1.81: download - view: text, markup, annotated - select for diffs
Tue Jan 30 18:28:02 1996 UTC (30 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +6 -2 lines
Accept DIOCEJECT as a synonym for CDIOCEJECT.  Implement DIOCLOCK
separately from CDIOCALLOW and CDIOCPREVENT, even though they perform
basically the same function (with a different interface XXX).

Revision 1.80: download - view: text, markup, annotated - select for diffs
Fri Jan 12 22:43:26 1996 UTC (30 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +5 -4 lines
Handle cases like the following:
	- controller calls scsi_done() with error XS_TIMEOUT
	- scsi_done() calls sddone()
	- sddone() calls disk_unbusy()
	- scsi_done() calls controller to retry command (missing the
	  call to disk_busy())
	- controller calls scsi_done()
	- scsi_done() calls sddone()
	- sddone() calls disk_busy(), which panics because of the imbalance.
Bug noticed by Leo Weppleman, who also suggested this fix; pass an additional
boolean argument ("complete") to the device's "done" routine, with a
value of `0' passed from the previous call to "done", and add an additional
call to "done" when the xfer resources are freed.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Sun Jan 7 22:03:58 1996 UTC (30 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +41 -19 lines
New generic disk framework.  Highlights:

	- New metrics handling.  Metrics are now kept in the new
	  `struct disk'.  Busy time is now stored as a timeval, and
	  transfer count in bytes.

	- Storage for disklabels is now dynamically allocated, so that
	  the size of the disk structure is not machine-dependent.

	- Several new functions for attaching and detaching disks, and
	  handling metrics calculation.

Old-style instrumentation is still supported in drivers that did it before.
However, old-style instrumentation is being deprecated, and will go away
once the userland utilities are updated for the new framework.

For usage and architectural details, see the forthcoming disk(9) manual
page.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Thu Dec 7 19:11:32 1995 UTC (30 years, 11 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +39 -14 lines
In both cd.c and sd.c:
	If the read or write request can fit into a 6-byte cdb, then
	use a 6-byte cdb, otherwise use the 10-byte as before.

In sd.c:
	In sdattach(), make a note if the device is "ancient" (i.e.
	inqbuf.version & SID_ANSII == 0).

	Implement sdminphys(): if the device is "ancient", shorten the
	transfer so it will fit into a 6-byte cdb.

These changes have eliminated the rejected read/write requests on my
Sun 3/60 with 2 ESDI disks behind an Emulex MD21.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Sat Nov 11 20:07:57 1995 UTC (31 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +2 -13 lines
Remove the gratuitous code to check for a disc at boot time.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Tue Oct 10 02:52:56 1995 UTC (31 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +8 -1 lines
Return EINVAL if something other than a whole number of blocks is requested.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Tue Sep 26 19:26:48 1995 UTC (31 years, 1 month ago) by thorpej
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +1 -7 lines
Don't declare Debugger().  It's handled in <sys/systm.h>.
#include <sys/systm.h> where necessary, as suggested by Jonathan Stone.
Fixes PR #1511.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Sat Aug 12 21:36:46 1995 UTC (31 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +3 -1 lines
Fix oversight in previous.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Sat Aug 12 20:31:42 1995 UTC (31 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +24 -31 lines
minphys() functions really should return void.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Sat Aug 5 23:48:53 1995 UTC (31 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +30 -27 lines
Use an intermediate variable to shorten label initialization code.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Mon Jul 24 06:55:37 1995 UTC (31 years, 4 months ago) by cgd
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +3 -3 lines
update SCSI minphys routines' definitions to match standard minphys()
definition and usage.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Tue Jul 4 07:21:00 1995 UTC (31 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +28 -19 lines
Make each disk and tape driver define its own read and write functions.
Deprecate rawread() and rawwrite() completely.  Remove d_strategy from cdevsw to
force the abstraction barrier.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Mon Jun 26 05:15:33 1995 UTC (31 years, 4 months ago) by cgd
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +7 -3 lines
make dump stubs consistent

Revision 1.68: download - view: text, markup, annotated - select for diffs
Wed May 3 19:38:45 1995 UTC (31 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +10 -10 lines
Make the byte-shifting code consistent.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Sat Apr 15 05:01:26 1995 UTC (31 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +3 -2 lines
Don't boundary check I/O to the `raw' partition.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Sat Apr 1 10:29:41 1995 UTC (31 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +5 -3 lines
Add a missing unlock.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Wed Mar 29 23:04:39 1995 UTC (31 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +30 -35 lines
Revamp the locking mechanism slightly.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Sat Mar 25 19:45:18 1995 UTC (31 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +1 -7 lines
Remove the write protect check altogether, and rely on the drive to do it.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Thu Mar 23 12:13:37 1995 UTC (31 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +2 -8 lines
Don't bother with DIOCWLABEL.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Thu Mar 23 12:11:07 1995 UTC (31 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +7 -8 lines
Check for read-only media in open(), not write().

Revision 1.61: download - view: text, markup, annotated - select for diffs
Thu Mar 23 11:51:22 1995 UTC (31 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +3 -15 lines
Revert cdsize() to do nothing.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Thu Mar 23 11:43:09 1995 UTC (31 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +3 -4 lines
Rearrange DIOCWDINFO a little; closer to wd.c.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Thu Mar 23 11:37:51 1995 UTC (31 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +2 -2 lines
Fix typo.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Thu Mar 23 11:33:18 1995 UTC (31 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +80 -33 lines
Allow DIOCWDINFO even if label is not `writable'.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Tue Mar 7 21:46:06 1995 UTC (31 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +2 -2 lines
Correct spelling of `fictitious'.  Add patterns for optical memory devices.
From Alistair Crooks.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Mon Jan 30 11:50:23 1995 UTC (31 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +2 -2 lines
Finish last change.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Mon Jan 30 11:47:56 1995 UTC (31 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +3 -3 lines
Some drives don't grok START with LoEj=1, either.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Mon Jan 30 11:37:17 1995 UTC (31 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +3 -3 lines
Set the LoadEject bit when issuing a START.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Mon Jan 30 11:34:25 1995 UTC (31 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +12 -10 lines
Some devices really do require the START before the PREVENT.  This makes no
sense.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Thu Jan 26 12:05:49 1995 UTC (31 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +2 -2 lines
Update copyrights.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Thu Jan 26 11:56:51 1995 UTC (31 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +14 -18 lines
Redo the `wait for spin up' code.  The Mach 3 method clearly doesn't work.
Also, rearrange the first open sequences a bit; SDEV_OPEN is no longer magic.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Mon Jan 23 18:17:22 1995 UTC (31 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +4 -4 lines
Do the PREVENT before the START.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Mon Jan 16 21:31:34 1995 UTC (31 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +1 -3 lines
Remove unused macros.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Fri Jan 13 10:51:14 1995 UTC (31 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +7 -26 lines
Always boundary check I/O.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Wed Dec 28 19:42:47 1994 UTC (31 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +96 -113 lines
Numerous changes.  Many bugs fixed, better autoconfig, a few new features.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Fri Dec 16 04:38:30 1994 UTC (31 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +1 -4 lines
Remove DIOCSBAD handling.  It's not actually handled, so why recognize it?

Revision 1.45: download - view: text, markup, annotated - select for diffs
Wed Dec 14 15:20:11 1994 UTC (31 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +1 -2 lines
Remove dkbad.h.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Wed Nov 23 07:55:25 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +8 -7 lines
There's no point in bothering to unlock what we didn't lock.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Tue Nov 22 03:23:49 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +34 -33 lines
Add still more locking.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Mon Nov 21 10:39:09 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +7 -11 lines
Replace dev_unit with device_softc in scsi_link.  Change argument to foostart()
to void*.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Sun Nov 20 22:36:43 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +121 -88 lines
Add some missing locking, and some general cleanup.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sun Oct 30 21:49:14 1994 UTC (32 years ago) by cgd
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +2 -2 lines
be more careful with types, also pull in headers where necessary.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Thu Oct 20 20:31:23 1994 UTC (32 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +2 -2 lines
First cut at making user-level SCSI commands work.  This is untested.
Partly from John Brezak.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Thu Oct 20 14:10:18 1994 UTC (32 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +3 -2 lines
Fix minor omission.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Thu Oct 20 14:09:10 1994 UTC (32 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +10 -10 lines
openpart -> openmask

Revision 1.36: download - view: text, markup, annotated - select for diffs
Thu Oct 20 14:03:38 1994 UTC (32 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +75 -70 lines
Similar changes to sd.c.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri Oct 14 18:27:47 1994 UTC (32 years, 1 month ago) by cgd
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +4 -8 lines
move arch dependence to archs.  clean up a bit.  deal with weird MAXPARTITONS.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Thu Aug 11 23:51:26 1994 UTC (32 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +29 -10 lines
On probe or open, retry the READ CAPACITY once if the drive reports NOT READY.

Revision 1.31.2.2: download - view: text, markup, annotated - select for diffs
Fri Aug 5 23:01:02 1994 UTC (32 years, 3 months ago) by mycroft
Diff to: previous 1.31.2.1: preferred, colored; next MAIN 1.32: preferred, colored
Changes since revision 1.31.2.1: +2 -2 lines
update from trunk

Revision 1.33: download - view: text, markup, annotated - select for diffs
Fri Aug 5 22:56:49 1994 UTC (32 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -2 lines
Fix spelling of `STEREO'.

Revision 1.31.2.1: download - view: text, markup, annotated - select for diffs
Thu Aug 4 10:14:14 1994 UTC (32 years, 3 months ago) by mycroft
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +12 -2 lines
update from trunk

Revision 1.32: download - view: text, markup, annotated - select for diffs
Thu Aug 4 09:52:47 1994 UTC (32 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +12 -2 lines
Obey the command queue size for the controller.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Mon Jul 4 20:39:46 1994 UTC (32 years, 4 months ago) by chopps
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +5 -4 lines
change to support other MAXPARTITIONS vals aside from 8

Revision 1.30: download - view: text, markup, annotated - select for diffs
Wed Jun 29 06:42:53 1994 UTC (32 years, 4 months ago) by cgd
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +2 -2 lines
New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.29: download - view: text, markup, annotated - select for diffs
Thu Jun 16 15:57:39 1994 UTC (32 years, 5 months ago) by chopps
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +8 -9 lines
resolve confusion over who owns the buf after calling scsi_scsi_cmd()

Revision 1.28: download - view: text, markup, annotated - select for diffs
Thu Jun 16 01:11:40 1994 UTC (32 years, 5 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -2 lines
b_un.b_addr -> b_data

Revision 1.27: download - view: text, markup, annotated - select for diffs
Wed May 11 09:53:52 1994 UTC (32 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +11 -2 lines
Add dummy *dump() routines.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon May 9 07:40:47 1994 UTC (32 years, 6 months ago) by chopps
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +3 -1 lines
remove union's from sense_data struct, conditionaly define RAW_PART

Revision 1.25: download - view: text, markup, annotated - select for diffs
Mon Apr 11 03:53:58 1994 UTC (32 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +3 -9 lines
Fix various types.  Remove some outdated flags.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Mon Apr 11 02:23:41 1994 UTC (32 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +5 -5 lines
Combine scsi_start_unit() and scsi_stop_unit(), and increase the start
timeout (again).

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue Mar 29 04:29:22 1994 UTC (32 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +912 -1552 lines
New SCSI system, based on Julian's more recent work.

Revision 1.18.2.10: download - view: text, markup, annotated - select for diffs
Wed Feb 16 02:40:39 1994 UTC (32 years, 9 months ago) by mycroft
Diff to: previous 1.18.2.9: preferred, colored; next MAIN 1.19: preferred, colored
Changes since revision 1.18.2.9: +68 -80 lines
More KNF-like.

Revision 1.18.2.9: download - view: text, markup, annotated - select for diffs
Wed Feb 16 00:42:31 1994 UTC (32 years, 9 months ago) by mycroft
Diff to: previous 1.18.2.8: preferred, colored
Changes since revision 1.18.2.8: +14 -8 lines
Don't return the toc header in CDIOREADTOCENTRYS.

Revision 1.18.2.8: download - view: text, markup, annotated - select for diffs
Sun Feb 6 10:06:41 1994 UTC (32 years, 9 months ago) by mycroft
Diff to: previous 1.18.2.7: preferred, colored
Changes since revision 1.18.2.7: +2 -2 lines
Use b_actf, not av_forw.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Feb 6 10:05:54 1994 UTC (32 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +2 -2 lines
Use b_actf, not av_forw.

Revision 1.18.2.7: download - view: text, markup, annotated - select for diffs
Tue Feb 1 20:13:26 1994 UTC (32 years, 9 months ago) by mycroft
Diff to: previous 1.18.2.6: preferred, colored
Changes since revision 1.18.2.6: +3 -1 lines
Another change from the Mac code...

Revision 1.18.2.6: download - view: text, markup, annotated - select for diffs
Tue Feb 1 20:05:16 1994 UTC (32 years, 9 months ago) by mycroft
Diff to: previous 1.18.2.5: preferred, colored
Changes since revision 1.18.2.5: +7 -3 lines
Add scsi_stop_unit(), from Mac code.  Other minor nits.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue Jan 11 17:21:57 1994 UTC (32 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +3 -3 lines
*strategy functions return void.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Thu Dec 23 09:35:51 1993 UTC (32 years, 11 months ago) by cgd
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +9 -4 lines
fix from Nick Cuccia (cuccia@remarque.berkeley.edu), apparently
originating from Gary Grebus <glg@k8lt.ampr.org>: partition size
must be in units of DEV_BSIZE.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Fri Dec 17 08:50:33 1993 UTC (32 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +21 -20 lines
Canonicalize all #includes.

Revision 1.18.2.5: download - view: text, markup, annotated - select for diffs
Mon Nov 29 06:14:03 1993 UTC (32 years, 11 months ago) by mycroft
Diff to: previous 1.18.2.4: preferred, colored
Changes since revision 1.18.2.4: +8 -4 lines
Use dk_establish().

Revision 1.18.2.4: download - view: text, markup, annotated - select for diffs
Thu Nov 25 10:19:12 1993 UTC (32 years, 11 months ago) by mycroft
Diff to: previous 1.18.2.3: preferred, colored
Changes since revision 1.18.2.3: +5 -3 lines
Don't display extraneous errors if there is no CD present during probe.

Revision 1.18.2.3: download - view: text, markup, annotated - select for diffs
Thu Nov 25 10:01:29 1993 UTC (32 years, 11 months ago) by mycroft
Diff to: previous 1.18.2.2: preferred, colored
Changes since revision 1.18.2.2: +552 -755 lines
(Hopefully) make cd work.  Make cd and sd more similar.  Implement variable
block sizes in sd.

Revision 1.18.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 24 05:02:56 1993 UTC (33 years ago) by mycroft
Diff to: previous 1.18.2.1: preferred, colored
Changes since revision 1.18.2.1: +920 -1389 lines
Under construction...

Revision 1.18.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 24 08:57:08 1993 UTC (33 years, 2 months ago) by mycroft
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -3 lines
cd.c, sd.c, st.c: strategy functions return void.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Aug 4 19:33:44 1993 UTC (33 years, 3 months ago) by brezak
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +8 -8 lines
Normalize play_msf changes with 386bsd patch.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Aug 4 17:26:23 1993 UTC (33 years, 3 months ago) by brezak
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +49 -1 lines
Add play_msf command and MSF variants. This is SCSI2 stuff and is needed for many flavors of player utilities.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Aug 1 19:26:17 1993 UTC (33 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +4 -3 lines
Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.

Revision 1.15.2.1: download - view: text, markup, annotated - select for diffs
Sat Jul 31 12:28:18 1993 UTC (33 years, 3 months ago) by cgd
Diff to: previous 1.15: preferred, colored; next MAIN 1.16: preferred, colored
Changes since revision 1.15: +4 -3 lines
give names, err, wmesg's, to my "pain" -- i.e. convert sleep() to tsleep()

Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Jul 19 11:30:49 1993 UTC (33 years, 4 months ago) by cgd
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -2 lines
patches from allen briggs to fix a minor bug in *attach()

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sun Jun 27 07:01:17 1993 UTC (33 years, 4 months ago) by andrew
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -3 lines
ANSIfications.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Jun 17 12:18:29 1993 UTC (33 years, 5 months ago) by brezak
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +4 -3 lines
Silence size complaint at probe.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Wed Jun 16 04:31:37 1993 UTC (33 years, 5 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -2 lines
whoops. typo.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Jun 16 03:39:30 1993 UTC (33 years, 5 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -1 lines
fix to intuit the maximum number of scsi units available on a device
driver. this piece at least, should be safe from changing sizeof(dev_t)

Revision 1.10: download - view: text, markup, annotated - select for diffs
Tue May 25 07:27:31 1993 UTC (33 years, 6 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +21 -21 lines
patch00149 by Julian Elischer <julian@jules.dialix.oz.au> & Rodney Grimes.
When an error was encountered, the sd/cd drivers printed blockno&ff0000
rather that blockno.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu May 20 22:48:57 1993 UTC (33 years, 6 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +1 -2 lines
First cut at cpu independent disklabels.
There will be niggly little details no doubt..

Revision 1.8: download - view: text, markup, annotated - select for diffs
Thu May 20 03:46:15 1993 UTC (33 years, 6 months ago) by cgd
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +1 -11 lines
add rcsids and clean up file headers

Revision 1.7: download - view: text, markup, annotated - select for diffs
Tue May 11 08:07:50 1993 UTC (33 years, 6 months ago) by cgd
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +1 -1 lines
fix stupid line transposition (from John Brezak <brezak@osf.org>)

Revision 1.6: download - view: text, markup, annotated - select for diffs
Tue May 4 08:27:29 1993 UTC (33 years, 6 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +25 -19 lines
support for making dev->id_alive be set, this is for iostat to
find disk devices. wee bit of a kludge. sub-device attach()
routines must now return 1 for successful attach(), 0 otherwise.
Other bsd's do this too..

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Apr 20 10:51:51 1993 UTC (33 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +1 -1 lines
Display more meaningful message on SCSI `unit attention'.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Apr 12 12:10:28 1993 UTC (33 years, 7 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +50 -34 lines
fixed various bugs like cdattach() returning garbage.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Apr 12 08:19:28 1993 UTC (33 years, 7 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +102 -135 lines
new scsi subsystem.
changes also in config/mkioconf.c
	i386/isa/wd.c, fd.c, and all scsi drivers.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sat Apr 10 12:07:14 1993 UTC (33 years, 7 months ago) by glass
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -4 lines
fixed to be compliant, subservient, and to take advantage of the newly
hacked config(8)

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Mar 21 18:04:42 1993 UTC (33 years, 8 months ago) by cgd
Branches: MAIN
after 0.2.2 "stable" patches applied

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>