The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.336 / (download) - annotate - [select for diffs], Sat Feb 24 22:06:49 2024 UTC (7 weeks, 2 days ago) by mlelstv
Branch: MAIN
CVS Tags: HEAD
Changes since 1.335: +5 -4 lines
Diff to previous 1.335 (colored)

Don't try to discover wedges when the unit isn't online.

Revision 1.327.4.3 / (download) - annotate - [select for diffs], Mon Aug 29 16:18:10 2022 UTC (19 months, 2 weeks ago) by martin
Branch: netbsd-9
Changes since 1.327.4.2: +4 -5 lines
Diff to previous 1.327.4.2 (colored) to branchpoint 1.327 (colored) next main 1.328 (colored)

Pull up following revision(s) (requested by mlelstv in ticket #1509):

	sys/dev/scsipi/sdvar.h: revision 1.40
	sys/dev/scsipi/sd.c: revision 1.335

Don't fetch data beyond end of inquiry buffer, which, here, is not
NUL-terminated.

Reduce target buffer to needed size (product name + NUL terminator).

Revision 1.335 / (download) - annotate - [select for diffs], Sun Aug 28 10:26:37 2022 UTC (19 months, 2 weeks ago) by mlelstv
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, 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
Changes since 1.334: +4 -5 lines
Diff to previous 1.334 (colored)

Don't fetch data beyond end of inquiry buffer, which, here, is not
NUL-terminated.

Reduce target buffer to needed size (product name + NUL terminator).

Revision 1.334 / (download) - annotate - [select for diffs], Mon Mar 28 12:39:46 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.333: +6 -2 lines
Diff to previous 1.333 (colored)

sd(4): Use d_cfdriver/devtounit to avoid open/detach races.

Revision 1.333 / (download) - annotate - [select for diffs], Thu Jan 27 18:44:49 2022 UTC (2 years, 2 months ago) by jakllsch
Branch: MAIN
Changes since 1.332: +4 -9 lines
Diff to previous 1.332 (colored)

use powerof2() in sd_validate_blksize()

Revision 1.331.4.1 / (download) - annotate - [select for diffs], Thu Jun 17 04:46:30 2021 UTC (2 years, 9 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.331: +3 -3 lines
Diff to previous 1.331 (colored) next main 1.332 (colored)

Sync w/ HEAD.

Revision 1.331.6.1 / (download) - annotate - [select for diffs], Mon May 31 22:15:19 2021 UTC (2 years, 10 months ago) by cjep
Branch: cjep_staticlib_x
Changes since 1.331: +3 -3 lines
Diff to previous 1.331 (colored) next main 1.332 (colored)

sync with head

Revision 1.332 / (download) - annotate - [select for diffs], Sun May 30 06:46:46 2021 UTC (2 years, 10 months ago) by dholland
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base, thorpej-cfargs2, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1
Changes since 1.331: +3 -3 lines
Diff to previous 1.331 (colored)

typo in comment

Revision 1.330.2.1 / (download) - annotate - [select for diffs], Sat Apr 3 22:28:50 2021 UTC (3 years ago) by thorpej
Branch: thorpej-futex
Changes since 1.330: +4 -3 lines
Diff to previous 1.330 (colored) next main 1.331 (colored)

Sync with HEAD.

Revision 1.324.6.2 / (download) - annotate - [select for diffs], Thu Feb 11 12:54:56 2021 UTC (3 years, 2 months ago) by martin
Branch: netbsd-8
Changes since 1.324.6.1: +4 -3 lines
Diff to previous 1.324.6.1 (colored) to branchpoint 1.324 (colored) next main 1.325 (colored)

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.327.4.2 / (download) - annotate - [select for diffs], Thu Feb 11 12:53:28 2021 UTC (3 years, 2 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE
Changes since 1.327.4.1: +4 -3 lines
Diff to previous 1.327.4.1 (colored) to branchpoint 1.327 (colored)

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.331 / (download) - annotate - [select for diffs], Wed Feb 10 16:30:01 2021 UTC (3 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-cfargs-base, thorpej-cfargs, cjep_staticlib_x-base
Branch point for: thorpej-i2c-spi-conf, cjep_staticlib_x
Changes since 1.330: +4 -3 lines
Diff to previous 1.330 (colored)

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

Revision 1.330 / (download) - annotate - [select for diffs], Fri Sep 25 13:08:00 2020 UTC (3 years, 6 months ago) by jakllsch
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.329: +6 -6 lines
Diff to previous 1.329 (colored)

spelling fixes in sd.c comments

Revision 1.325.6.3 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:38 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.325.6.2: +1 -1 lines
Diff to previous 1.325.6.2 (colored) to branchpoint 1.325 (colored) next main 1.326 (colored)

Sync with HEAD

Revision 1.328.4.1 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:07 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.328: +3 -3 lines
Diff to previous 1.328 (colored) next main 1.329 (colored)

Sync with HEAD

Revision 1.329 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:02 2020 UTC (4 years ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Changes since 1.328: +3 -3 lines
Diff to previous 1.328 (colored)

constify

Revision 1.325.6.2 / (download) - annotate - [select for diffs], Wed Apr 8 14:08:12 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.325.6.1: +3 -3 lines
Diff to previous 1.325.6.1 (colored) to branchpoint 1.325 (colored)

Merge changes from current as of 20200406

Revision 1.327.4.1 / (download) - annotate - [select for diffs], Sat Mar 21 15:52:09 2020 UTC (4 years ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-1-RELEASE
Changes since 1.327: +3 -3 lines
Diff to previous 1.327 (colored)

Pull up following revision(s) (requested by riastradh in ticket #795):

	sys/dev/dksubr.c: revision 1.112
	sys/arch/xen/xen/xbd_xenbus.c: revision 1.95
	sys/dev/scsipi/sd.c: revision 1.328
	sys/dev/dkvar.h: revision 1.32
	sys/dev/ld.c: revision 1.109
	sys/dev/cgd.c: revision 1.120
	sys/dev/raidframe/rf_netbsdkintf.c: revision 1.380
	sys/dev/ata/wd.c: revision 1.458

Add a flag to dk_dump for virtual disk devices.

If a disk is backed by a physical medium other than itself, such as
cgd(4), then it passes DK_DUMP_RECURSIVE to disable the recursion
detection for dk_dump.

If, however, a device represents a physical medium on its own, such
as wd(4), then it passes 0 instead.

With this, I can now dump to dk on cgd on dk on wd.

Revision 1.328 / (download) - annotate - [select for diffs], Sun Mar 1 03:21:54 2020 UTC (4 years, 1 month ago) by riastradh
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.327: +3 -3 lines
Diff to previous 1.327 (colored)

Add a flag to dk_dump for virtual disk devices.

If a disk is backed by a physical medium other than itself, such as
cgd(4), then it passes DK_DUMP_RECURSIVE to disable the recursion
detection for dk_dump.

If, however, a device represents a physical medium on its own, such
as wd(4), then it passes 0 instead.

With this, I can now dump to dk on cgd on dk on wd.

Revision 1.325.6.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:32 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.325: +14 -9 lines
Diff to previous 1.325 (colored)

Sync with HEAD

Revision 1.327 / (download) - annotate - [select for diffs], Tue Mar 19 06:59:40 2019 UTC (5 years ago) by mlelstv
Branch: MAIN
CVS Tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: netbsd-9
Changes since 1.326: +5 -3 lines
Diff to previous 1.326 (colored)

Set disk product name as disk type. The information can be queried through
drvctl(4).

Revision 1.325.4.1 / (download) - annotate - [select for diffs], Sat Oct 20 06:58:43 2018 UTC (5 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.325: +11 -8 lines
Diff to previous 1.325 (colored) next main 1.326 (colored)

Sync with head

Revision 1.326 / (download) - annotate - [select for diffs], Sun Oct 7 18:14:32 2018 UTC (5 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020
Changes since 1.325: +11 -8 lines
Diff to previous 1.325 (colored)

Handle the SATA to USB external enclosure sold by "Sabrent" and
made by JMicro (vendor=0x152d product=0x0578). This bridge does
not understand FUA, so add a quirk for it.

Revision 1.298.2.4 / (download) - annotate - [select for diffs], Sun Dec 3 11:37:32 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.298.2.3: +488 -882 lines
Diff to previous 1.298.2.3 (colored) to branchpoint 1.298 (colored) next main 1.299 (colored)

update from HEAD

Revision 1.310.2.6 / (download) - annotate - [select for diffs], Mon Aug 28 17:52:27 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.310.2.5: +40 -9 lines
Diff to previous 1.310.2.5 (colored) to branchpoint 1.310 (colored) next main 1.311 (colored)

Sync with HEAD

Revision 1.324.6.1 / (download) - annotate - [select for diffs], Wed Jun 21 18:18:55 2017 UTC (6 years, 9 months ago) by snj
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, 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
Changes since 1.324: +3 -3 lines
Diff to previous 1.324 (colored)

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.325 / (download) - annotate - [select for diffs], Sat Jun 17 22:35:50 2017 UTC (6 years, 10 months ago) by mlelstv
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, phil-wifi-base, pgoyette-compat-base, pgoyette-compat-0930, pgoyette-compat-0906, 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
Changes since 1.324: +3 -3 lines
Diff to previous 1.324 (colored)

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.324.4.1 / (download) - annotate - [select for diffs], Thu Apr 27 05:36:36 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.324: +4 -2 lines
Diff to previous 1.324 (colored) next main 1.325 (colored)

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.317.2.5 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:23 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.317.2.4: +39 -8 lines
Diff to previous 1.317.2.4 (colored) to branchpoint 1.317 (colored) next main 1.318 (colored)

Sync with HEAD

Revision 1.322.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:53:52 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.322: +39 -8 lines
Diff to previous 1.322 (colored) next main 1.323 (colored)

Sync with HEAD

Revision 1.324 / (download) - annotate - [select for diffs], Mon Apr 10 18:20:43 2017 UTC (7 years ago) by jdolecek
Branch: 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
Changes since 1.323: +4 -4 lines
Diff to previous 1.323 (colored)

execute the cache page MODE SENSE with XS_CTL_SILENT; it's pretty normal
for e.g. USB sticks thus showing error is not really useful, and the pretty
printing triggers autoload of scsiverbose module and immediate deadlock when
the DIOCGCACHE call is made by WAPBL during root mount

adresses PR kern/52147 by Michael van Elst

Revision 1.323 / (download) - annotate - [select for diffs], Wed Apr 5 20:15:49 2017 UTC (7 years ago) by jdolecek
Branch: MAIN
Changes since 1.322: +37 -6 lines
Diff to previous 1.322 (colored)

expose disk device FUA/DPO support via DIOCGCACHE, and allow the flags
to be set for I/O; implement support in sd(4) and nvme(4)

discussed on tech-kern

Revision 1.310.2.5 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:46 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.310.2.4: +436 -816 lines
Diff to previous 1.310.2.4 (colored) to branchpoint 1.310 (colored)

Sync with HEAD

Revision 1.317.2.4 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:41 2017 UTC (7 years, 3 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.317.2.3: +448 -819 lines
Diff to previous 1.317.2.3 (colored) to branchpoint 1.317 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.322 / (download) - annotate - [select for diffs], Wed Dec 21 21:28:30 2016 UTC (7 years, 3 months ago) by mlelstv
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320, pgoyette-localcount-20170107, nick-nhusb-base-20170204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.321: +3 -3 lines
Diff to previous 1.321 (colored)

really keep request queued after resource shortage

Revision 1.321 / (download) - annotate - [select for diffs], Fri Dec 16 14:58:53 2016 UTC (7 years, 4 months ago) by mlelstv
Branch: MAIN
Changes since 1.320: +3 -2 lines
Diff to previous 1.320 (colored)

add comment about "missing" dk_start.

Revision 1.320 / (download) - annotate - [select for diffs], Sat Dec 10 10:26:38 2016 UTC (7 years, 4 months ago) by mlelstv
Branch: MAIN
Changes since 1.319: +435 -816 lines
Diff to previous 1.319 (colored)

Refactored sd and cd to use common disk subroutines.

Revision 1.310.2.4 / (download) - annotate - [select for diffs], Mon Dec 5 10:55:17 2016 UTC (7 years, 4 months ago) by skrll
Branch: nick-nhusb
Changes since 1.310.2.3: +35 -25 lines
Diff to previous 1.310.2.3 (colored) to branchpoint 1.310 (colored)

Sync with HEAD

Revision 1.319 / (download) - annotate - [select for diffs], Sun Nov 20 15:37:19 2016 UTC (7 years, 4 months ago) by mlelstv
Branch: MAIN
CVS Tags: nick-nhusb-base-20161204
Changes since 1.318: +33 -23 lines
Diff to previous 1.318 (colored)

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.318 / (download) - annotate - [select for diffs], Sun Nov 20 02:38:24 2016 UTC (7 years, 4 months ago) by pgoyette
Branch: MAIN
Changes since 1.317: +4 -4 lines
Diff to previous 1.317 (colored)

Avoid calling bufq_free() from critical code sections.

Revision 1.317.2.3 / (download) - annotate - [select for diffs], Tue Jul 26 05:54:39 2016 UTC (7 years, 8 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.317.2.2: +4 -4 lines
Diff to previous 1.317.2.2 (colored) to branchpoint 1.317 (colored)

Rename LOCALCOUNT_INITIALIZER to DEVSW_MODULE_INIT.  This better describes
what we're doing, and why.

Revision 1.317.2.2 / (download) - annotate - [select for diffs], Tue Jul 19 06:26:59 2016 UTC (7 years, 8 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.317.2.1: +4 -12 lines
Diff to previous 1.317.2.1 (colored) to branchpoint 1.317 (colored)

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.317.2.1 / (download) - annotate - [select for diffs], Mon Jul 18 03:49:59 2016 UTC (7 years, 9 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.317: +13 -2 lines
Diff to previous 1.317 (colored)

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.310.2.3 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:00 2015 UTC (8 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.310.2.2: +4 -2 lines
Diff to previous 1.310.2.2 (colored) to branchpoint 1.310 (colored)

Sync with HEAD

Revision 1.317 / (download) - annotate - [select for diffs], Mon Aug 24 23:13:15 2015 UTC (8 years, 7 months ago) by pooka
Branch: 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, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.316: +4 -2 lines
Diff to previous 1.316 (colored)

would you like some freshly ground _KERNEL_OPT with that?
yes?  excellent choice, sir/madam.

Revision 1.310.2.2 / (download) - annotate - [select for diffs], Sat Jun 6 14:40:13 2015 UTC (8 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.310.2.1: +10 -8 lines
Diff to previous 1.310.2.1 (colored) to branchpoint 1.310 (colored)

Sync with HEAD

Revision 1.316 / (download) - annotate - [select for diffs], Sun Apr 26 15:15:20 2015 UTC (8 years, 11 months ago) by mlelstv
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606
Changes since 1.315: +6 -3 lines
Diff to previous 1.315 (colored)

Use C99-style initializers for struct dkdriver.

Revision 1.315 / (download) - annotate - [select for diffs], Mon Apr 13 16:33:25 2015 UTC (9 years ago) by riastradh
Branch: MAIN
Changes since 1.314: +3 -4 lines
Diff to previous 1.314 (colored)

Convert sys/dev to use <sys/rndsource.h>.

Revision 1.310.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:13 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.310: +6 -74 lines
Diff to previous 1.310 (colored)

Sync with HEAD

Revision 1.314 / (download) - annotate - [select for diffs], Fri Jan 2 19:42:07 2015 UTC (9 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20150406
Changes since 1.313: +4 -4 lines
Diff to previous 1.313 (colored)

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.313 / (download) - annotate - [select for diffs], Wed Dec 31 19:52:06 2014 UTC (9 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.312: +3 -27 lines
Diff to previous 1.312 (colored)

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.312 / (download) - annotate - [select for diffs], Wed Dec 31 17:06:48 2014 UTC (9 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.311: +2 -44 lines
Diff to previous 1.311 (colored)

Centralize wedge ioctls in disk_ioctl.

Revision 1.311 / (download) - annotate - [select for diffs], Wed Dec 31 08:24:50 2014 UTC (9 years, 3 months ago) by mlelstv
Branch: MAIN
Changes since 1.310: +3 -5 lines
Diff to previous 1.310 (colored)

disk_blocksize and disk_set_info relay the same information
to the disk subsystem.

Make disk_set_info also set blocksize shift values.
Remove every call to disk_blocksize.

Keep disk_blocksize for ABI compatibility, make it also set dg_secsize.

Revision 1.308.2.1 / (download) - annotate - [select for diffs], Tue Nov 11 10:36:41 2014 UTC (9 years, 5 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, 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
Changes since 1.308: +11 -2 lines
Diff to previous 1.308 (colored) next main 1.309 (colored)

Pull up following revision(s) (requested by mlelstv in ticket #201):
	sbin/dkctl/dkctl.8: revision 1.24
	sbin/dkctl/dkctl.8: revision 1.25
	sys/dev/scsipi/sd.c: revision 1.310
	sys/dev/ata/wd.c: revision 1.415
	sbin/dkctl/dkctl.c: revision 1.21
	sys/dev/raidframe/rf_netbsdkintf.c: revision 1.315
	sys/dev/ld.c: revision 1.78
	sys/dev/vnd.c: revision 1.234
	sys/dev/dksubr.c: revision 1.54
	sys/sys/dkio.h: revision 1.20
	sys/dev/dkwedge/dk.c: revision 1.74
Add ioctl to autodiscover wedges.
Implement DIOCMWEDGES ioctl that triggers wedge autodiscovery.
Also fix a reference counting bug and clean up some code.
support DIOCMWEDGES ioctl.
Add 'makewedges' option to autodiscover wedges from a changed label.
New sentence, new line. Bump date for previous.

Revision 1.310 / (download) - annotate - [select for diffs], Tue Nov 4 07:51:55 2014 UTC (9 years, 5 months ago) by mlelstv
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.309: +11 -2 lines
Diff to previous 1.309 (colored)

support DIOCMWEDGES ioctl.

Revision 1.309 / (download) - annotate - [select for diffs], Fri Sep 5 05:30:42 2014 UTC (9 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.308: +9 -9 lines
Diff to previous 1.308 (colored)

Don't use new as a variable name.

Revision 1.298.2.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:50 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.298.2.2: +25 -8 lines
Diff to previous 1.298.2.2 (colored) to branchpoint 1.298 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.308 / (download) - annotate - [select for diffs], Sun Aug 10 16:44:36 2014 UTC (9 years, 8 months ago) by tls
Branch: MAIN
CVS Tags: tls-maxphys-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.307: +3 -3 lines
Diff to previous 1.307 (colored)

Merge tls-earlyentropy branch into HEAD.

Revision 1.305.2.2 / (download) - annotate - [select for diffs], Sun Aug 10 06:54:58 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.305.2.1: +4 -2 lines
Diff to previous 1.305.2.1 (colored) to branchpoint 1.305 (colored) next main 1.306 (colored)

Rebase.

Revision 1.307 / (download) - annotate - [select for diffs], Fri Jul 25 08:10:38 2014 UTC (9 years, 8 months ago) by dholland
Branch: MAIN
CVS Tags: tls-earlyentropy-base
Changes since 1.306: +3 -2 lines
Diff to previous 1.306 (colored)

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.306 / (download) - annotate - [select for diffs], Fri Jul 25 08:02:20 2014 UTC (9 years, 8 months ago) by dholland
Branch: MAIN
Changes since 1.305: +3 -2 lines
Diff to previous 1.305 (colored)

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.294.2.3 / (download) - annotate - [select for diffs], Thu May 22 11:40:35 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.294.2.2: +43 -50 lines
Diff to previous 1.294.2.2 (colored) to branchpoint 1.294 (colored) next main 1.295 (colored)

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.301.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:45:46 2014 UTC (9 years, 11 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.301: +24 -9 lines
Diff to previous 1.301 (colored) next main 1.302 (colored)

sync with head

Revision 1.305.2.1 / (download) - annotate - [select for diffs], Mon Apr 7 03:37:33 2014 UTC (10 years ago) by tls
Branch: tls-earlyentropy
Changes since 1.305: +3 -3 lines
Diff to previous 1.305 (colored)

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.305 / (download) - annotate - [select for diffs], Sun Mar 16 05:20:29 2014 UTC (10 years, 1 month ago) by dholland
Branch: MAIN
CVS Tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.304: +20 -5 lines
Diff to previous 1.304 (colored)

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.304 / (download) - annotate - [select for diffs], Fri Oct 25 16:03:51 2013 UTC (10 years, 5 months ago) by martin
Branch: MAIN
Changes since 1.303: +3 -3 lines
Diff to previous 1.303 (colored)

Mark a diagnostic-only variable

Revision 1.303 / (download) - annotate - [select for diffs], Sat Sep 28 09:01:36 2013 UTC (10 years, 6 months ago) by skrll
Branch: MAIN
Changes since 1.302: +3 -3 lines
Diff to previous 1.302 (colored)

Remove unnecessary initialisation of error

Revision 1.302 / (download) - annotate - [select for diffs], Thu Sep 26 16:00:54 2013 UTC (10 years, 6 months ago) by kiyohara
Branch: MAIN
Changes since 1.301: +4 -4 lines
Diff to previous 1.301 (colored)

Reset variable error to 0 before handle each ioctl cmd.  Or returns EPASSTHROUGH
when some cmds. (e.g. ODIOCGDINFO)

Revision 1.298.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:21 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.298.2.1: +21 -43 lines
Diff to previous 1.298.2.1 (colored) to branchpoint 1.298 (colored)

resync from head

Revision 1.301 / (download) - annotate - [select for diffs], Thu Jun 13 00:55:01 2013 UTC (10 years, 10 months ago) by tls
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: rmind-smpnet
Changes since 1.300: +6 -6 lines
Diff to previous 1.300 (colored)

Convert the entropy pool framework from pseudo-callout-driven to
soft interrupt driven operation.

Add a polling mode of operation -- now we can ask hardware random number
generators to top us up just when we need it (bcm2835_rng and amdpm
converted as examples).

Fix a stall noticed with repeated reads from /dev/random while testing.

Revision 1.300 / (download) - annotate - [select for diffs], Wed May 29 00:47:49 2013 UTC (10 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.299: +13 -38 lines
Diff to previous 1.299 (colored)

phase 1 of disk geometry cleanup:
	- centralize the geometry -> plist code so that we don't have
	  n useless copies of it.

Revision 1.299 / (download) - annotate - [select for diffs], Tue Apr 16 21:01:09 2013 UTC (11 years ago) by jakllsch
Branch: MAIN
CVS Tags: khorben-n900
Changes since 1.298: +6 -3 lines
Diff to previous 1.298 (colored)

Clamp sectors per unit in the default disklabel to the maximum value,
instead of allowing it to wrap, as is already done in wd(4).

Revision 1.275.4.1 / (download) - annotate - [select for diffs], Wed Oct 31 15:17:53 2012 UTC (11 years, 5 months ago) by riz
Branch: 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
Changes since 1.275: +46 -3 lines
Diff to previous 1.275 (colored) next main 1.276 (colored)


sys/dev/scsipi/sd.c				patch

	Allow disk strategy to be queried and changed at runtime
	for sd(4) disks.
	[buhrow, ticket #1807]

Revision 1.298.2.1 / (download) - annotate - [select for diffs], Wed Sep 12 06:15:33 2012 UTC (11 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.298: +10 -2 lines
Diff to previous 1.298 (colored)

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.294.2.2 / (download) - annotate - [select for diffs], Wed May 23 10:08:05 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.294.2.1: +5 -5 lines
Diff to previous 1.294.2.1 (colored) to branchpoint 1.294 (colored)

sync with head.

Revision 1.295.2.2 / (download) - annotate - [select for diffs], Sun Apr 29 23:05:00 2012 UTC (11 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.295.2.1: +8 -5 lines
Diff to previous 1.295.2.1 (colored) to branchpoint 1.295 (colored) next main 1.296 (colored)

sync to latest -current.

Revision 1.296.2.1 / (download) - annotate - [select for diffs], Mon Apr 23 16:28:30 2012 UTC (11 years, 11 months ago) by riz
Branch: 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
Changes since 1.296: +5 -5 lines
Diff to previous 1.296 (colored) next main 1.297 (colored)

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.298 / (download) - annotate - [select for diffs], Thu Apr 19 17:45:20 2012 UTC (11 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, jmcneill-usbmp-base9, jmcneill-usbmp-base10, agc-symver-base, agc-symver
Branch point for: tls-maxphys
Changes since 1.297: +5 -5 lines
Diff to previous 1.297 (colored)

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.294.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:02 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.294: +20 -15 lines
Diff to previous 1.294 (colored)

sync with head

Revision 1.297 / (download) - annotate - [select for diffs], Fri Apr 6 22:50:39 2012 UTC (12 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base4
Changes since 1.296: +5 -2 lines
Diff to previous 1.296 (colored)

Add a quirk for the Apple iPod whose mode sense commands fails with not ready.
Seems to work just fine if we send a start command first...

Revision 1.295.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:34:59 2012 UTC (12 years, 2 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.295: +15 -13 lines
Diff to previous 1.295 (colored)

merge to -current.

Revision 1.296 / (download) - annotate - [select for diffs], Thu Feb 2 19:43:06 2012 UTC (12 years, 2 months ago) by tls
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.295: +15 -13 lines
Diff to previous 1.295 (colored)

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.295 / (download) - annotate - [select for diffs], Fri Nov 25 12:39:56 2011 UTC (12 years, 4 months ago) by joerg
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.294: +4 -4 lines
Diff to previous 1.294 (colored)

Replace memset with incorrect size argument with M_ZERO.

Revision 1.294 / (download) - annotate - [select for diffs], Sat Jul 30 12:08:37 2011 UTC (12 years, 8 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Changes since 1.293: +4 -4 lines
Diff to previous 1.293 (colored)

Add an FSILENT flag and use it to suppress "Medium Not Present" scsipi
spam when trying to access offline drives at boot.

Revision 1.272.4.8 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:11 2010 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.272.4.7: +47 -2 lines
Diff to previous 1.272.4.7 (colored) to branchpoint 1.272 (colored) next main 1.273 (colored)

sync with head.

Revision 1.292.2.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:42 2010 UTC (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.292: +47 -2 lines
Diff to previous 1.292 (colored) next main 1.293 (colored)

sync with head

Revision 1.291.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:43:49 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.291: +49 -4 lines
Diff to previous 1.291 (colored) next main 1.292 (colored)

Sync with HEAD.

Revision 1.293 / (download) - annotate - [select for diffs], Wed Apr 14 22:26:33 2010 UTC (14 years ago) by jakllsch
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.292: +47 -2 lines
Diff to previous 1.292 (colored)

Implement DIOC[GS]STRATEGY for sd(4).

Revision 1.272.4.7 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:03 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.272.4.6: +10 -10 lines
Diff to previous 1.272.4.6 (colored) to branchpoint 1.272 (colored)

sync with head

Revision 1.292 / (download) - annotate - [select for diffs], Wed Feb 24 22:38:08 2010 UTC (14 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9
Branch point for: rmind-uvmplock
Changes since 1.291: +4 -4 lines
Diff to previous 1.291 (colored)

A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.

Revision 1.291 / (download) - annotate - [select for diffs], Fri Jan 8 20:05:16 2010 UTC (14 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.290: +4 -4 lines
Diff to previous 1.290 (colored)

Expand PMF_FN_* macros.

Revision 1.290 / (download) - annotate - [select for diffs], Wed Oct 21 21:12:05 2009 UTC (14 years, 5 months ago) by rmind
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase
Changes since 1.289: +8 -8 lines
Diff to previous 1.289 (colored)

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.272.4.6 / (download) - annotate - [select for diffs], Wed Aug 19 18:47:19 2009 UTC (14 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.272.4.5: +5 -4 lines
Diff to previous 1.272.4.5 (colored) to branchpoint 1.272 (colored)

sync with head.

Revision 1.289 / (download) - annotate - [select for diffs], Mon Aug 3 09:40:45 2009 UTC (14 years, 8 months ago) by jnemeth
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Changes since 1.288: +5 -4 lines
Diff to previous 1.288 (colored)

Fix previous where the call of sd_set_properties was moved from
the end of sdattach() to the end of sd_get_parms().  The code at
the bottom of sd_get_parms() was only used for optical drives or
in the case where the drive geometry couldn't be retrived for some
reason, to create a fake geometry.  The case for setting up the
real geometry was handled above that code.

Revision 1.277.2.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:20 2009 UTC (14 years, 8 months ago) by jym
Branch: jym-xensuspend
Changes since 1.277.2.1: +56 -55 lines
Diff to previous 1.277.2.1 (colored) to branchpoint 1.277 (colored) next main 1.278 (colored)

Sync with HEAD.

Revision 1.272.4.5 / (download) - annotate - [select for diffs], Sat Jul 18 14:53:11 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.272.4.4: +5 -4 lines
Diff to previous 1.272.4.4 (colored) to branchpoint 1.272 (colored)

sync with head.

Revision 1.288 / (download) - annotate - [select for diffs], Sun Jun 21 14:06:49 2009 UTC (14 years, 9 months ago) by jakllsch
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, jymxensuspend-base
Changes since 1.287: +5 -4 lines
Diff to previous 1.287 (colored)

Move call of sd_set_properties() to end of sd_get_parms(), rather than
sdattach().  This allows DIOCGDISKINFO to do the right thing even when
the media has changed.  Note that drvctl -p will only DTRT if disk has
been opened since the most recent media chenged.

Revision 1.272.4.4 / (download) - annotate - [select for diffs], Sat Jun 20 07:20:29 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.272.4.3: +53 -53 lines
Diff to previous 1.272.4.3 (colored) to branchpoint 1.272 (colored)

sync with head

Revision 1.287 / (download) - annotate - [select for diffs], Fri Jun 5 21:52:32 2009 UTC (14 years, 10 months ago) by haad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5
Changes since 1.286: +6 -2 lines
Diff to previous 1.286 (colored)

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.286 / (download) - annotate - [select for diffs], Wed May 20 03:26:21 2009 UTC (14 years, 11 months ago) by dyoung
Branch: MAIN
Changes since 1.285: +3 -3 lines
Diff to previous 1.285 (colored)

On second thought, let's call disk_predetach() disk_begindetach().
Verbs are good.

Revision 1.285 / (download) - annotate - [select for diffs], Tue May 19 23:43:44 2009 UTC (14 years, 11 months ago) by dyoung
Branch: MAIN
Changes since 1.284: +10 -17 lines
Diff to previous 1.284 (colored)

Use disk_predetach().

Revision 1.284 / (download) - annotate - [select for diffs], Tue May 19 19:56:11 2009 UTC (14 years, 11 months ago) by dyoung
Branch: MAIN
Changes since 1.283: +3 -23 lines
Diff to previous 1.283 (colored)

Delete wdactivate() and sdactivate().  They were no-ops, but as a
side-effect of registering them, config_detach(9) cleared DVF_ACTIVE
before it called wddetach() or sddetach().  Even though sd(4)'s
detachment may have subsequently failed with EBUSY, we could not
begin new disk I/O on sd(4) because the device had been deactivated.

By analogy to sdstrategy(), test device_is_active() in wdstrategy()
and if it is false set b_errno to EIO instead of initiating new
disk I/O.

XXX We should decline more politely to start new I/O, since
XXX !device_is_active() may mean simply that the device is suspended.
XXX I suppose that EIO is safe as long as system suspension is
XXX all-or-nothing.

Revision 1.283 / (download) - annotate - [select for diffs], Sun May 17 18:11:34 2009 UTC (14 years, 11 months ago) by dyoung
Branch: MAIN
Changes since 1.282: +3 -3 lines
Diff to previous 1.282 (colored)

Reverse the sense of the DETACH_FORCE check so that we return EBUSY in
the correct circumstances.

Revision 1.282 / (download) - annotate - [select for diffs], Sat May 16 20:10:52 2009 UTC (14 years, 11 months ago) by dyoung
Branch: MAIN
Changes since 1.281: +55 -32 lines
Diff to previous 1.281 (colored)

Do not detach a sd(4) instance if it is open, but return EBUSY,
instead.  If the detach is forced, do what sdclose() does on the
last close: flush the cache, delete our reference to the SCSI bus
device, et cetera.

Revision 1.272.4.3 / (download) - annotate - [select for diffs], Sat May 16 10:41:44 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.272.4.2: +10 -10 lines
Diff to previous 1.272.4.2 (colored) to branchpoint 1.272 (colored)

sync with head

Revision 1.277.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:23 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.277: +23 -29 lines
Diff to previous 1.277 (colored)

Sync with HEAD.

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

Revision 1.281 / (download) - annotate - [select for diffs], Tue May 12 14:44:31 2009 UTC (14 years, 11 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base4, jym-xensuspend-base
Changes since 1.280: +10 -10 lines
Diff to previous 1.280 (colored)

struct device * -> device_t, no functional changes intended.

Revision 1.280 / (download) - annotate - [select for diffs], Tue May 12 13:20:33 2009 UTC (14 years, 11 months ago) by cegger
Branch: MAIN
Changes since 1.279: +4 -4 lines
Diff to previous 1.279 (colored)

struct cfdata * -> cfdata_t, no functional changes intended.

Revision 1.272.4.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:18 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.272.4.1: +57 -59 lines
Diff to previous 1.272.4.1 (colored) to branchpoint 1.272 (colored)

sync with head.

Revision 1.275.2.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:36:33 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.275.2.1: +15 -21 lines
Diff to previous 1.275.2.1 (colored) to branchpoint 1.275 (colored) next main 1.276 (colored)

Sync with HEAD.

Revision 1.279 / (download) - annotate - [select for diffs], Fri Apr 10 17:36:42 2009 UTC (15 years ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.278: +11 -19 lines
Diff to previous 1.278 (colored)

Use a PMF shutdown hook instead of shutdownhook_establish().  This ought
to stop the crash during shutdown that yamt@ reports in kern/41182.

Revision 1.278 / (download) - annotate - [select for diffs], Tue Apr 7 18:35:17 2009 UTC (15 years ago) by dyoung
Branch: MAIN
Changes since 1.277: +6 -4 lines
Diff to previous 1.277 (colored)

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.275.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:03 2009 UTC (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.275: +8 -8 lines
Diff to previous 1.275 (colored)

Sync with HEAD.

Revision 1.269.6.8 / (download) - annotate - [select for diffs], Sat Jan 17 20:17:09 2009 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.269.6.7: +8 -8 lines
Diff to previous 1.269.6.7 (colored) to branchpoint 1.269 (colored) next main 1.270 (colored)

- Fix a CVS merge breakage
- Catch up with some driver changes

Revision 1.269.6.7 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:08 2009 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.269.6.6: +6 -6 lines
Diff to previous 1.269.6.6 (colored) to branchpoint 1.269 (colored)

Sync with HEAD.

Revision 1.277 / (download) - annotate - [select for diffs], Tue Jan 13 13:35:54 2009 UTC (15 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.276: +7 -7 lines
Diff to previous 1.276 (colored)

g/c BUFQ_FOO() macros and use bufq_foo() directly.

Revision 1.276 / (download) - annotate - [select for diffs], Sun Jan 11 10:30:43 2009 UTC (15 years, 3 months ago) by cegger
Branch: MAIN
Changes since 1.275: +3 -3 lines
Diff to previous 1.275 (colored)

make this compile

Revision 1.274.4.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:17:04 2008 UTC (15 years, 5 months ago) by haad
Branch: haad-dm
Changes since 1.274: +33 -26 lines
Diff to previous 1.274 (colored) next main 1.275 (colored)

Sync with HEAD.

Revision 1.269.6.6 / (download) - annotate - [select for diffs], Sun Sep 28 10:40:31 2008 UTC (15 years, 6 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.269.6.5: +31 -24 lines
Diff to previous 1.269.6.5 (colored) to branchpoint 1.269 (colored)

Sync with HEAD.

Revision 1.273.2.2 / (download) - annotate - [select for diffs], Thu Sep 18 04:35:10 2008 UTC (15 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.273.2.1: +33 -26 lines
Diff to previous 1.273.2.1 (colored) to branchpoint 1.273 (colored) next main 1.274 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.274.2.1 / (download) - annotate - [select for diffs], Fri Jul 18 16:37:43 2008 UTC (15 years, 9 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.274: +33 -26 lines
Diff to previous 1.274 (colored) next main 1.275 (colored)

Sync with head.

Revision 1.275 / (download) - annotate - [select for diffs], Wed Jul 16 18:54:09 2008 UTC (15 years, 9 months ago) by drochner
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base, netbsd-5-base, 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-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, 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, 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
Changes since 1.274: +33 -26 lines
Diff to previous 1.274 (colored)

split device/softc for sd (tested with a USB stick)

Revision 1.269.6.5 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:10 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.269.6.4: +8 -11 lines
Diff to previous 1.269.6.4 (colored) to branchpoint 1.269 (colored)

Sync with HEAD.

Revision 1.273.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:29 2008 UTC (15 years, 9 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.273: +10 -13 lines
Diff to previous 1.273 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.272.2.2 / (download) - annotate - [select for diffs], Tue Jun 17 09:14:57 2008 UTC (15 years, 10 months ago) by yamt
Branch: yamt-pf42
Changes since 1.272.2.1: +10 -13 lines
Diff to previous 1.272.2.1 (colored) to branchpoint 1.272 (colored) next main 1.273 (colored)

sync with head.

Revision 1.274 / (download) - annotate - [select for diffs], Sun Jun 8 18:18:34 2008 UTC (15 years, 10 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Branch point for: simonb-wapbl, haad-dm
Changes since 1.273: +10 -13 lines
Diff to previous 1.273 (colored)

Use device_lookup_private() rather than using cd_devs[] directly to get softc.

XXX maybe we should change a type of cd_devs[] in struct cfdriver
    from (void *) to device_t.

Revision 1.269.6.4 / (download) - annotate - [select for diffs], Mon Jun 2 13:23:51 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.269.6.3: +15 -26 lines
Diff to previous 1.269.6.3 (colored) to branchpoint 1.269 (colored)

Sync with HEAD.

Revision 1.272.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:34:46 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.272: +2 -9 lines
Diff to previous 1.272 (colored)

sync with head.

Revision 1.272.4.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:06 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.272: +2 -9 lines
Diff to previous 1.272 (colored)

sync with head.

Revision 1.273 / (download) - annotate - [select for diffs], Mon Apr 28 20:23:58 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Changes since 1.272: +2 -9 lines
Diff to previous 1.272 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.269.6.3 / (download) - annotate - [select for diffs], Sun Apr 6 09:58:51 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.269.6.2: +4 -16 lines
Diff to previous 1.269.6.2 (colored) to branchpoint 1.269 (colored)

- 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 / (download) - annotate - [select for diffs], Sat Apr 5 15:47:01 2008 UTC (16 years ago) by cegger
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.271: +15 -19 lines
Diff to previous 1.271 (colored)

use aprint_*_dev and device_xname

Revision 1.269.6.2 / (download) - annotate - [select for diffs], Thu Apr 3 12:42:56 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.269.6.1: +28 -6 lines
Diff to previous 1.269.6.1 (colored) to branchpoint 1.269 (colored)

Sync with HEAD.

Revision 1.269.6.1 / (download) - annotate - [select for diffs], Sat Mar 29 16:17:57 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.269: +40 -3 lines
Diff to previous 1.269 (colored)

- 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.269.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:08 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.269: +28 -6 lines
Diff to previous 1.269 (colored) next main 1.270 (colored)

sync with head.

Revision 1.265.4.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:52 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.265.4.2: +28 -6 lines
Diff to previous 1.265.4.2 (colored) to branchpoint 1.265 (colored) next main 1.266 (colored)

sync with HEAD

Revision 1.240.2.8 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:27 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.240.2.7: +4 -4 lines
Diff to previous 1.240.2.7 (colored) next main 1.241 (colored)

sync with head.

Revision 1.271 / (download) - annotate - [select for diffs], Fri Feb 29 06:42:35 2008 UTC (16 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Changes since 1.270: +4 -4 lines
Diff to previous 1.270 (colored)

Use PMF_FN_ARGS, PMF_FN_PROTO.

Revision 1.240.2.7 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:46 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.240.2.6: +27 -5 lines
Diff to previous 1.240.2.6 (colored)

sync with head.

Revision 1.270 / (download) - annotate - [select for diffs], Thu Feb 21 21:52:06 2008 UTC (16 years, 1 month ago) by drochner
Branch: MAIN
CVS Tags: hpcarm-cleanup-base
Changes since 1.269: +27 -5 lines
Diff to previous 1.269 (colored)

put back the old shutdown handlers to flush the disk cache,
the pmf API can't deal with all the different suspend/resume/reboot
cases well yet, so better keep suspend/resume and reboot/halt/poweroff
clearly seperated

Revision 1.267.4.1 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:25 2008 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.267: +3 -3 lines
Diff to previous 1.267 (colored) next main 1.268 (colored)

Sync with HEAD.

Revision 1.240.2.6 / (download) - annotate - [select for diffs], Mon Jan 21 09:44:36 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.240.2.5: +12 -21 lines
Diff to previous 1.240.2.5 (colored)

sync with head

Revision 1.265.4.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:54:31 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.265.4.1: +12 -21 lines
Diff to previous 1.265.4.1 (colored) to branchpoint 1.265 (colored)

sync with HEAD

Revision 1.268.2.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:55:13 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.268: +3 -3 lines
Diff to previous 1.268 (colored) next main 1.269 (colored)

Sync with HEAD

Revision 1.267.6.1 / (download) - annotate - [select for diffs], Wed Dec 26 19:47:22 2007 UTC (16 years, 3 months ago) by ad
Branch: vmlocking2
Changes since 1.267: +12 -21 lines
Diff to previous 1.267 (colored) next main 1.268 (colored)

Sync with head.

Revision 1.269 / (download) - annotate - [select for diffs], Tue Dec 25 18:33:43 2007 UTC (16 years, 3 months ago) by perry
Branch: MAIN
CVS Tags: vmlocking2-base3, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.268: +3 -3 lines
Diff to previous 1.268 (colored)

Convert many of the uses of __attribute__ to equivalent
__packed, __unused and __dead macros from cdefs.h

Revision 1.267.8.1 / (download) - annotate - [select for diffs], Tue Dec 11 15:39:59 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-kmem
Changes since 1.267: +11 -20 lines
Diff to previous 1.267 (colored) next main 1.268 (colored)

sync with head.

Revision 1.268 / (download) - annotate - [select for diffs], Sun Dec 9 20:28:23 2007 UTC (16 years, 4 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, cube-autoconf-base, cube-autoconf
Branch point for: bouyer-xeni386
Changes since 1.267: +11 -20 lines
Diff to previous 1.267 (colored)

Merge jmcneill-pm branch.

Revision 1.265.2.5 / (download) - annotate - [select for diffs], Sat Dec 8 16:21:36 2007 UTC (16 years, 4 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.265.2.4: +4 -4 lines
Diff to previous 1.265.2.4 (colored) to branchpoint 1.265 (colored) next main 1.266 (colored)

Rename pnp(9) -> pmf(9), as requested by many.

Revision 1.265.4.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:30:16 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.265: +5 -4 lines
Diff to previous 1.265 (colored)

sync with HEAD

Revision 1.265.2.4 / (download) - annotate - [select for diffs], Tue Nov 6 14:27:31 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.265.2.3: +11 -20 lines
Diff to previous 1.265.2.3 (colored) to branchpoint 1.265 (colored)

Refactor PNP API:
- Make suspend/resume directly a device functionality. It consists of
  three layers (class logic, device logic, bus logic), all of them being
  optional. This replaces D0/D3 transitions.
- device_is_active returns true if the device was not disabled and was
  not suspended (even partially), device_is_enabled returns true if the
  device was enabled.
- Change pnp_global_transition into pnp_system_suspend and
  pnp_system_resume. Before running any suspend/resume handlers, check
  that all currently attached devices support power management and bail
  out otherwise. The latter is not done for the shutdown/panic case.
- Make the former bus-specific generic network handlers a class handler.
- Make PNP message like volume up/down/toogle PNP events. Each device
  can register what events they are interested in and whether the handler
  should be global or not.
- Introduce device_active API for devices to mark themselve in use from
  either the system or the device. Use this to implement the idle handling
  for audio and input devices. This is intended to replace most ad-hoc
  watchdogs as well.
- Fix somes situations in which audio resume would lose mixer settings.
- Make USB host controllers better deal with suspend in the light of
  shared interrupts.
- Flush filesystem cache on suspend.
- Flush disk caches on suspend. Put ATA disks into standby on suspend as
  well.
- Adopt drivers to use the new PNP API.
- Fix a critical bug in the generic cardbus layer that made D0->D3
  break.
- Fix ral(4) to set if_stop.
- Convert cbb(4) to the new PNP API.
- Apply the PCI Express SCI fix on resume again.

Revision 1.240.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:34:16 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.240.2.4: +5 -4 lines
Diff to previous 1.240.2.4 (colored)

sync with head.

Revision 1.265.2.3 / (download) - annotate - [select for diffs], Fri Oct 26 15:47:36 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.265.2.2: +4 -4 lines
Diff to previous 1.265.2.2 (colored) to branchpoint 1.265 (colored)

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.265.6.2 / (download) - annotate - [select for diffs], Sun Oct 14 11:48:18 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.265.6.1: +4 -4 lines
Diff to previous 1.265.6.1 (colored) to branchpoint 1.265 (colored) next main 1.266 (colored)

sync with head.

Revision 1.261.2.5 / (download) - annotate - [select for diffs], Tue Oct 9 15:22:12 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.261.2.4: +3 -2 lines
Diff to previous 1.261.2.4 (colored) to branchpoint 1.261 (colored) next main 1.262 (colored)

Sync with head.

Revision 1.267 / (download) - annotate - [select for diffs], Mon Oct 8 16:41:14 2007 UTC (16 years, 6 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-kmem-base, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, vmlocking-base, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: yamt-kmem, vmlocking2, mjf-devfs
Changes since 1.266: +4 -4 lines
Diff to previous 1.266 (colored)

Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.

Revision 1.265.6.1 / (download) - annotate - [select for diffs], Sat Oct 6 15:31:30 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.265: +3 -2 lines
Diff to previous 1.265 (colored)

sync with head.

Revision 1.265.2.2 / (download) - annotate - [select for diffs], Tue Oct 2 18:28:39 2007 UTC (16 years, 6 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.265.2.1: +2284 -0 lines
Diff to previous 1.265.2.1 (colored) to branchpoint 1.265 (colored)

Sync with HEAD.

Revision 1.266 / (download) - annotate - [select for diffs], Mon Oct 1 18:16:05 2007 UTC (16 years, 6 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-x86pmap-base2
Changes since 1.265: +3 -2 lines
Diff to previous 1.265 (colored)

Properly initialize xs_callout in sddump(). We're using a static scsipi_xfer
here which didn't get through scsipi_get_xs().
Pointed out by Greg Oster.

Revision 1.240.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:38:41 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.240.2.3: +97 -46 lines
Diff to previous 1.240.2.3 (colored)

sync with head.

Revision 1.258.6.1 / (download) - annotate - [select for diffs], Mon Sep 3 07:04:43 2007 UTC (16 years, 7 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.258: +48 -2 lines
Diff to previous 1.258 (colored) next main 1.259 (colored)

Sync w/ NetBSD-4-RC_1

Revision 1.261.2.4 / (download) - annotate - [select for diffs], Mon Aug 20 18:16:15 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.261.2.3: +45 -36 lines
Diff to previous 1.261.2.3 (colored) to branchpoint 1.261 (colored)

- Alter disk attach/detach to fix a panic when closing a vnd device.
- Sync with HEAD.

Revision 1.261.2.3 / (download) - annotate - [select for diffs], Sun Aug 19 19:24:34 2007 UTC (16 years, 8 months ago) by ad
Branch: vmlocking
Changes since 1.261.2.2: +21 -10 lines
Diff to previous 1.261.2.2 (colored) to branchpoint 1.261 (colored)

- Back out the biodone() changes.
- Eliminate B_ERROR (from HEAD).

Revision 1.262.2.1 / (download) - annotate - [select for diffs], Wed Aug 15 13:48:44 2007 UTC (16 years, 8 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.262: +46 -41 lines
Diff to previous 1.262 (colored) next main 1.263 (colored)

Sync with HEAD.

Revision 1.265.8.2 / (download) - annotate - [select for diffs], Fri Aug 3 13:56:38 2007 UTC (16 years, 8 months ago) by tsutsui
Branch: matt-mips64
Changes since 1.265.8.1: +2283 -0 lines
Diff to previous 1.265.8.1 (colored) to branchpoint 1.265 (colored) next main 1.266 (colored)

Don't allocate data buffer on stack in sd_read_capacity().

If data buffer is allocated on stack at the end of CPU cacheline,
the same cacheline region might be accessed via kernel stack even
after bus_dmamap_sync(9) against the data buffer in lower scsi drivers
so that read data via DMA could be lost.

Fixes occasional readdisklabel(9) failure at boot on ews4800mips
with osiop(4) driver and 128byte cacheline.

XXX: Other functions/drivers might have the similar problem.

Revision 1.265.8.1, Fri Aug 3 13:56:37 2007 UTC (16 years, 8 months ago) by tsutsui
Branch: matt-mips64
Changes since 1.265: +0 -2283 lines
FILE REMOVED

file sd.c was added on branch matt-mips64 on 2007-08-03 13:56:38 +0000

Revision 1.265.2.1, Fri Aug 3 13:56:37 2007 UTC (16 years, 8 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.265: +0 -2283 lines
FILE REMOVED

file sd.c was added on branch jmcneill-pm on 2007-10-02 18:28:39 +0000

Revision 1.265 / (download) - annotate - [select for diffs], Fri Aug 3 13:56:37 2007 UTC (16 years, 8 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-x86pmap-base, nick-csl-alignment-base5, matt-mips64-base
Branch point for: yamt-x86pmap, matt-mips64, matt-armv6, jmcneill-pm
Changes since 1.264: +36 -20 lines
Diff to previous 1.264 (colored)

Don't allocate data buffer on stack in sd_read_capacity().

If data buffer is allocated on stack at the end of CPU cacheline,
the same cacheline region might be accessed via kernel stack even
after bus_dmamap_sync(9) against the data buffer in lower scsi drivers
so that read data via DMA could be lost.

Fixes occasional readdisklabel(9) failure at boot on ews4800mips
with osiop(4) driver and 128byte cacheline.

XXX: Other functions/drivers might have the similar problem.

Revision 1.258.2.1 / (download) - annotate - [select for diffs], Tue Jul 31 21:47:15 2007 UTC (16 years, 8 months ago) by liamjfoy
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, 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
Changes since 1.258: +48 -2 lines
Diff to previous 1.258 (colored) next main 1.259 (colored)

Pull up following revision(s) (requested by jnemeth in ticket #803):
	sys/dev/scsipi/sd.c: revision 1.260
add support devctl properties

Revision 1.264 / (download) - annotate - [select for diffs], Sun Jul 29 12:50:23 2007 UTC (16 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: hpcarm-cleanup
Changes since 1.263: +5 -9 lines
Diff to previous 1.263 (colored)

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.263 / (download) - annotate - [select for diffs], Sat Jul 21 19:51:48 2007 UTC (16 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.262: +9 -16 lines
Diff to previous 1.262 (colored)

Replace some uses of lockmgr().

Revision 1.261.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:08:19 2007 UTC (16 years, 9 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.261: +3 -3 lines
Diff to previous 1.261 (colored) next main 1.262 (colored)

Sync with head.

Revision 1.262 / (download) - annotate - [select for diffs], Mon Jul 9 21:01:22 2007 UTC (16 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base
Branch point for: nick-csl-alignment
Changes since 1.261: +3 -3 lines
Diff to previous 1.261 (colored)

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.261.2.2 / (download) - annotate - [select for diffs], Sun Jul 1 21:48:59 2007 UTC (16 years, 9 months ago) by ad
Branch: vmlocking
Changes since 1.261.2.1: +3 -3 lines
Diff to previous 1.261.2.1 (colored) to branchpoint 1.261 (colored)

Adapt to callout API change.

Revision 1.261.2.1 / (download) - annotate - [select for diffs], Sun May 13 17:36:29 2007 UTC (16 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.261: +12 -27 lines
Diff to previous 1.261 (colored)

- 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.258.4.2 / (download) - annotate - [select for diffs], Mon Mar 12 05:57:10 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.258.4.1: +52 -6 lines
Diff to previous 1.258.4.1 (colored) to branchpoint 1.258 (colored) next main 1.259 (colored)

Sync with HEAD.

Revision 1.261 / (download) - annotate - [select for diffs], Sun Mar 4 06:02:43 2007 UTC (17 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.260: +6 -6 lines
Diff to previous 1.260 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.260 / (download) - annotate - [select for diffs], Sat Mar 3 02:44:44 2007 UTC (17 years, 1 month ago) by jnemeth
Branch: MAIN
Changes since 1.259: +48 -2 lines
Diff to previous 1.259 (colored)

add support devctl properties

Revision 1.258.4.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:03 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.258: +3 -3 lines
Diff to previous 1.258 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.240.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:10:42 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.240.2.2: +3 -3 lines
Diff to previous 1.240.2.2 (colored)

sync with head.

Revision 1.259 / (download) - annotate - [select for diffs], Wed Feb 21 23:00:01 2007 UTC (17 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.258: +3 -3 lines
Diff to previous 1.258 (colored)

Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.

Revision 1.249.4.2 / (download) - annotate - [select for diffs], Fri Jan 12 00:57:48 2007 UTC (17 years, 3 months ago) by ad
Branch: newlock2
Changes since 1.249.4.1: +163 -46 lines
Diff to previous 1.249.4.1 (colored) to branchpoint 1.249 (colored) next main 1.250 (colored)

Sync with head.

Revision 1.240.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:49:34 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.240.2.1: +185 -61 lines
Diff to previous 1.240.2.1 (colored)

sync with head.

Revision 1.250.2.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:16 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.250.2.1: +171 -54 lines
Diff to previous 1.250.2.1 (colored) to branchpoint 1.250 (colored) next main 1.251 (colored)

sync with head.

Revision 1.258 / (download) - annotate - [select for diffs], Thu Nov 30 17:59:35 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base
Branch point for: yamt-idlelwp, wrstuden-fixsa, netbsd-4
Changes since 1.257: +36 -16 lines
Diff to previous 1.257 (colored)

Prevent kernel crashes caused by umass devices that return bogus mode sense
data, such as the "Cooler Master". From Rhialto. While there, clean up some
debugging code and make the offset unsigned.

Revision 1.257 / (download) - annotate - [select for diffs], Wed Nov 29 21:06:49 2006 UTC (17 years, 4 months ago) by drochner
Branch: MAIN
Changes since 1.256: +4 -3 lines
Diff to previous 1.256 (colored)

restore a nice little feature which got lost in some previous commit:
the d_typename field of the default disklabel is initialized with
text from the SCSI inquiry, so that one gets at least a vague idea which
disk he is dealing with

Revision 1.256 / (download) - annotate - [select for diffs], Sun Nov 26 05:01:09 2006 UTC (17 years, 4 months ago) by itohy
Branch: MAIN
Changes since 1.255: +118 -27 lines
Diff to previous 1.255 (colored)

If the block size reported by Read Capacity looks valid, just use it.
Use Request Sense only if Read Capacity succeeded and did not return
valid block size.
Discussed on tech-kern.
Fix the easier part of NetBSD PR kern/26537.
(The harder part is the device hangs on large (>= 8KB) transfer.
Possibly umass BBB problem?)

Remove scsipi_size() and scsipi_validate_secsize() from scsipi_base.c
and add their functions to sd.c since they are used only by sd.c.

Use SCSI term `block' instead of `sector' where applicable.

Revision 1.255 / (download) - annotate - [select for diffs], Sat Nov 25 12:06:31 2006 UTC (17 years, 4 months ago) by scw
Branch: MAIN
Changes since 1.254: +11 -6 lines
Diff to previous 1.254 (colored)

- Call disk_blocksize(9) once we know the disk's physical block size.
- bounds_check_with_label() has been fixed, so no need to fake the
  raw partition's size in terms of DEV_BSIZE units.

Revision 1.249.4.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:34:49 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.249: +16 -11 lines
Diff to previous 1.249 (colored)

Sync with head.

Revision 1.254 / (download) - annotate - [select for diffs], Thu Nov 16 01:33:26 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.253: +10 -10 lines
Diff to previous 1.253 (colored)

__unused removal on arguments; approved by core.

Revision 1.250.2.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:06:47 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.250: +19 -17 lines
Diff to previous 1.250 (colored)

sync with head

Revision 1.253 / (download) - annotate - [select for diffs], Fri Oct 20 07:11:50 2006 UTC (17 years, 6 months ago) by scw
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.252: +8 -7 lines
Diff to previous 1.252 (colored)

Validate the sector size returned by READ CAPACITY. If it looks bogus
print a warning and fallback to a suitable default.

Fixes a problem on hp700 reported by skrll@

Revision 1.252 / (download) - annotate - [select for diffs], Thu Oct 12 01:31:57 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.251: +11 -10 lines
Diff to previous 1.251 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.251 / (download) - annotate - [select for diffs], Mon Oct 9 21:29:14 2006 UTC (17 years, 6 months ago) by scw
Branch: MAIN
Changes since 1.250: +9 -9 lines
Diff to previous 1.250 (colored)

Some removable umass(4) devices don't respond to mode sense page 6, or
simply return zero for logical block size. In either case, use the sector
length reported by READ_CAPACITY instead of defaulting to 512 bytes.

This partially addresses the problems reported in PR port-i386/34707 and
PR kern/34737. Namely the incorrectly reported drive geometry and the
'hanging' issue.

However, since the device in question reports 2048-byte physical sectors
it will remain unusable until DEV_BSIZE is banished.

Revision 1.249.2.1 / (download) - annotate - [select for diffs], Fri Sep 22 05:32:19 2006 UTC (17 years, 6 months ago) by riz
Branch: abandoned-netbsd-4
Changes since 1.249: +6 -3 lines
Diff to previous 1.249 (colored) next main 1.250 (colored)

Pull up following revision(s) (requested by reinoud in ticket #168):
	sys/dev/scsipi/sd.c: revision 1.250
Fix same panic problem as with cd.c when a scsi error happends on
read/write action. It would panic on a diagnosic assertion. When a scsi
read/write command fails, the whole extent is gone bad so mark all as not
done.

Revision 1.250 / (download) - annotate - [select for diffs], Thu Sep 14 17:54:34 2006 UTC (17 years, 7 months ago) by reinoud
Branch: MAIN
CVS Tags: yamt-splraiseipl-base
Branch point for: yamt-splraiseipl
Changes since 1.249: +6 -3 lines
Diff to previous 1.249 (colored)

Fix same panic problem as with cd.c when a scsi error happends on
read/write action. It would panic on a diagnosic assertion. When a scsi
read/write command fails, the whole extent is gone bad so mark all as not
done.

Revision 1.244.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:54:25 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.244: +31 -25 lines
Diff to previous 1.244 (colored) next main 1.245 (colored)

sync with head

Revision 1.245.2.3 / (download) - annotate - [select for diffs], Fri Aug 11 15:45:08 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.245.2.2: +15 -13 lines
Diff to previous 1.245.2.2 (colored) to branchpoint 1.245 (colored) next main 1.246 (colored)

sync with head

Revision 1.248.2.1 / (download) - annotate - [select for diffs], Thu Jul 13 17:49:43 2006 UTC (17 years, 9 months ago) by gdamore
Branch: gdamore-uart
Changes since 1.248: +15 -13 lines
Diff to previous 1.248 (colored) next main 1.249 (colored)

Merge from HEAD.

Revision 1.249 / (download) - annotate - [select for diffs], Sun Jul 9 17:12:21 2006 UTC (17 years, 9 months ago) by drochner
Branch: MAIN
CVS Tags: yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, rpaulo-netinet-merge-pcb-base, abandoned-netbsd-4-base
Branch point for: newlock2, abandoned-netbsd-4
Changes since 1.248: +15 -13 lines
Diff to previous 1.248 (colored)

some fixes for removable media (USB floppies in particular):
-allow to open RAW_PART, even if readdisklabel() doesn't like what it sees
-fix PERIPH_MEDIA_LOADED toggling on every other open attempt
-Don't reset PERIPH_REMOVABLE if prevent/allow fails - this is normal
 for floppy drives. The flag is required for media change detection.
 Honour XS_CTL_SILENT for the "no door lock" printouts, and set that flag
 where scsipi_prevent() is called during open/close.
Tested with a USB floppy and a USB cardreader.

Revision 1.245.2.2 / (download) - annotate - [select for diffs], Mon Jun 26 12:52:27 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.245.2.1: +10 -6 lines
Diff to previous 1.245.2.1 (colored) to branchpoint 1.245 (colored)

sync with head.

Revision 1.240.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:06:47 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.240: +55 -31 lines
Diff to previous 1.240 (colored)

sync with head.

Revision 1.247.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:05:48 2006 UTC (17 years, 10 months ago) by chap
Branch: chap-midi
Changes since 1.247: +10 -6 lines
Diff to previous 1.247 (colored) next main 1.248 (colored)

Sync with head.

Revision 1.244.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:37:34 2006 UTC (17 years, 10 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.244.6.1: +10 -6 lines
Diff to previous 1.244.6.1 (colored) next main 1.245 (colored)

Sync with head.

Revision 1.248 / (download) - annotate - [select for diffs], Thu Jun 1 15:53:09 2006 UTC (17 years, 10 months ago) by nathanw
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, simonb-timecounters-base, gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Changes since 1.247: +10 -6 lines
Diff to previous 1.247 (colored)

Change return type of sdgetdisklabel() from void to int; return an error
if readdisklabel() returned an error.

sdopen(): Return an error if sdgetdisklabel() returns an error. This prevents
a crash in spec_open() (and possibly elsewhere) if a sd device is detached in
the middle of sdopen().

Revision 1.244.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:39:29 2006 UTC (17 years, 11 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.244: +11 -11 lines
Diff to previous 1.244 (colored)

Sync with head.

Revision 1.245.4.1 / (download) - annotate - [select for diffs], Wed Apr 19 03:26:20 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.245: +7 -7 lines
Diff to previous 1.245 (colored) next main 1.246 (colored)

sync with head.

Revision 1.245.2.1 / (download) - annotate - [select for diffs], Sat Apr 1 12:07:28 2006 UTC (18 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.245: +7 -7 lines
Diff to previous 1.245 (colored)

sync with head.

Revision 1.245.6.1 / (download) - annotate - [select for diffs], Fri Mar 31 09:45:25 2006 UTC (18 years ago) by tron
Branch: peter-altq
Changes since 1.245: +7 -7 lines
Diff to previous 1.245 (colored) next main 1.246 (colored)

Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.

Revision 1.247 / (download) - annotate - [select for diffs], Thu Mar 30 16:09:28 2006 UTC (18 years ago) by thorpej
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, elad-kernelauth-base
Branch point for: chap-midi
Changes since 1.246: +4 -4 lines
Diff to previous 1.246 (colored)

Use device_private().

Revision 1.246 / (download) - annotate - [select for diffs], Tue Mar 28 17:38:34 2006 UTC (18 years ago) by thorpej
Branch: MAIN
Changes since 1.245: +5 -5 lines
Diff to previous 1.245 (colored)

Use device_unit().

Revision 1.244.2.1 / (download) - annotate - [select for diffs], Wed Mar 1 09:28:28 2006 UTC (18 years, 1 month ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.244: +6 -6 lines
Diff to previous 1.244 (colored) next main 1.245 (colored)

sync with head.

Revision 1.245 / (download) - annotate - [select for diffs], Mon Feb 20 16:50:37 2006 UTC (18 years, 1 month ago) by thorpej
Branch: 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
Changes since 1.244: +6 -6 lines
Diff to previous 1.244 (colored)

Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.

Revision 1.237.2.3 / (download) - annotate - [select for diffs], Thu Dec 29 15:21:00 2005 UTC (18 years, 3 months ago) by riz
Branch: 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
Changes since 1.237.2.2: +6 -6 lines
Diff to previous 1.237.2.2 (colored) to branchpoint 1.237 (colored) next main 1.238 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1045):
	sys/dev/scsipi/sd.c: revision 1.243
Adapt previous change to recent scsipi. Pointed out by Simon Burge.

Revision 1.237.2.2 / (download) - annotate - [select for diffs], Thu Dec 29 15:20:29 2005 UTC (18 years, 3 months ago) by riz
Branch: netbsd-3
Changes since 1.237.2.1: +25 -4 lines
Diff to previous 1.237.2.1 (colored) to branchpoint 1.237 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1045):
	sys/dev/scsipi/sd.c: revision 1.242
Some USB devices reports themselves as removable, but have no door and
so don't support the SCSI_PREVENT_ALLOW_MEDIUM_REMOVAL command.
When an "Illegal field in CDB" is reported for this command, mark the
device as non-removable (which is always true for USB keys from the SCSI
point of view), print a message and ignore the error.
For DIOCLOCK, return ENOTTY if the device is not removable instead of
trying a command which will fail.
Fix a problem reported by Hubert Feyrer for some USB umass devices, patch
tested by him.

Revision 1.244 / (download) - annotate - [select for diffs], Sun Dec 11 12:23:50 2005 UTC (18 years, 4 months ago) by christos
Branch: MAIN
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.243: +7 -7 lines
Diff to previous 1.243 (colored)

merge ktrace-lwp.

Revision 1.202.2.13 / (download) - annotate - [select for diffs], Sun Dec 11 10:29:05 2005 UTC (18 years, 4 months ago) by christos
Branch: ktrace-lwp
Changes since 1.202.2.12: +25 -4 lines
Diff to previous 1.202.2.12 (colored) next main 1.203 (colored)

Sync with head.

Revision 1.243 / (download) - annotate - [select for diffs], Fri Dec 9 09:24:30 2005 UTC (18 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: ktrace-lwp-base
Changes since 1.242: +6 -6 lines
Diff to previous 1.242 (colored)

Adapt previous change to recent scsipi. Pointed out by Simon Burge.

Revision 1.242 / (download) - annotate - [select for diffs], Thu Dec 8 22:14:19 2005 UTC (18 years, 4 months ago) by bouyer
Branch: MAIN
Changes since 1.241: +25 -4 lines
Diff to previous 1.241 (colored)

Some USB devices reports themselves as removable, but have no door and
so don't support the SCSI_PREVENT_ALLOW_MEDIUM_REMOVAL command.
When an "Illegal field in CDB" is reported for this command, mark the
device as non-removable (which is always true for USB keys from the SCSI
point of view), print a message and ignore the error.
For DIOCLOCK, return ENOTTY if the device is not removable instead of
trying a command which will fail.

Fix a problem reported by Hubert Feyrer for some USB umass devices, patch
tested by him.

Revision 1.202.2.12 / (download) - annotate - [select for diffs], Thu Nov 10 14:07:47 2005 UTC (18 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.202.2.11: +17 -19 lines
Diff to previous 1.202.2.11 (colored)

Sync with HEAD. Here we go again...

Revision 1.241 / (download) - annotate - [select for diffs], Sat Oct 15 17:29:25 2005 UTC (18 years, 6 months ago) by yamt
Branch: 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
Changes since 1.240: +10 -11 lines
Diff to previous 1.240 (colored)

- 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.240 / (download) - annotate - [select for diffs], Sun May 29 22:00:50 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.239: +7 -7 lines
Diff to previous 1.239 (colored)

- Sprinkle const
- Avoid variable shadowing.
- Eliminate some caddr_t abuse.

Revision 1.232.2.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:17 2005 UTC (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.232: +37 -42 lines
Diff to previous 1.232 (colored) next main 1.233 (colored)

sync with -current

Revision 1.239 / (download) - annotate - [select for diffs], Mon Apr 25 17:35:26 2005 UTC (18 years, 11 months ago) by drochner
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.238: +4 -5 lines
Diff to previous 1.238 (colored)

Revert the part if 1.236 which comprises a functional change.
While I didn't observe a misbehaviour yet, this _must_ be
wrong because SSD_RCODE_VALID is used incorrectly.

Revision 1.237.2.1 / (download) - annotate - [select for diffs], Wed Apr 6 11:56:38 2005 UTC (19 years ago) by tron
Branch: 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
Changes since 1.237: +3 -9 lines
Diff to previous 1.237 (colored)

Pull up revision 1.238 (requested by yamt in ticket #112):
introduce a function to drain bufq and use it where appropriate.

Revision 1.202.2.11 / (download) - annotate - [select for diffs], Fri Apr 1 14:30:33 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.202.2.10: +3 -9 lines
Diff to previous 1.202.2.10 (colored)

Sync with HEAD.

Revision 1.238 / (download) - annotate - [select for diffs], Thu Mar 31 11:28:53 2005 UTC (19 years ago) by yamt
Branch: MAIN
Changes since 1.237: +3 -9 lines
Diff to previous 1.237 (colored)

introduce a function to drain bufq and use it where appropriate.

Revision 1.232.4.1 / (download) - annotate - [select for diffs], Sat Mar 19 08:35:47 2005 UTC (19 years, 1 month ago) by yamt
Branch: yamt-km
Changes since 1.232: +37 -35 lines
Diff to previous 1.232 (colored) next main 1.233 (colored)

sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.202.2.10 / (download) - annotate - [select for diffs], Fri Mar 4 16:50:34 2005 UTC (19 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.202.2.9: +37 -35 lines
Diff to previous 1.202.2.9 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.237 / (download) - annotate - [select for diffs], Sun Feb 27 00:27:48 2005 UTC (19 years, 1 month ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.236: +7 -7 lines
Diff to previous 1.236 (colored)

nuke trailing whitespace

Revision 1.236 / (download) - annotate - [select for diffs], Mon Feb 21 00:29:08 2005 UTC (19 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.235: +32 -30 lines
Diff to previous 1.235 (colored)

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.235 / (download) - annotate - [select for diffs], Tue Feb 1 00:19:34 2005 UTC (19 years, 2 months ago) by reinoud
Branch: MAIN
CVS Tags: yamt-km-base2
Changes since 1.234: +26 -27 lines
Diff to previous 1.234 (colored)

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.234 / (download) - annotate - [select for diffs], Mon Jan 31 23:06:41 2005 UTC (19 years, 2 months ago) by reinoud
Branch: MAIN
Changes since 1.233: +26 -25 lines
Diff to previous 1.233 (colored)

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.233 / (download) - annotate - [select for diffs], Mon Jan 31 21:13:16 2005 UTC (19 years, 2 months ago) by reinoud
Branch: MAIN
Changes since 1.232: +3 -3 lines
Diff to previous 1.232 (colored)

As part of cleaning up sys/scsipi, replace all u_char by uint8_t and
replace all `short' with int16_t.

Revision 1.202.2.9 / (download) - annotate - [select for diffs], Sat Dec 18 09:32:21 2004 UTC (19 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.202.2.8: +25 -19 lines
Diff to previous 1.202.2.8 (colored)

Sync with HEAD.

Revision 1.232 / (download) - annotate - [select for diffs], Tue Dec 7 23:16:40 2004 UTC (19 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-km-base, kent-audio1-beforemerge
Branch point for: yamt-km, kent-audio2
Changes since 1.231: +4 -4 lines
Diff to previous 1.231 (colored)

SYNCHRONIZE_CACHE -> SYNCHRONIZE_CACHE_10

Revision 1.231 / (download) - annotate - [select for diffs], Tue Dec 7 23:07:31 2004 UTC (19 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.230: +8 -8 lines
Diff to previous 1.230 (colored)

USe more appropriate macro/struct names for READ/WRITE (6) and
READ/WRITE (10).

Revision 1.230 / (download) - annotate - [select for diffs], Sat Dec 4 19:02:26 2004 UTC (19 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.229: +17 -11 lines
Diff to previous 1.229 (colored)

Use READ/WRITE (16) if the LBA is larger than 32 bits.  Another bit
of kern/28514.

Revision 1.202.2.8 / (download) - annotate - [select for diffs], Tue Nov 2 07:52:46 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.202.2.7: +3 -2 lines
Diff to previous 1.202.2.7 (colored)

Sync with HEAD.

Revision 1.229 / (download) - annotate - [select for diffs], Thu Oct 28 07:07:45 2004 UTC (19 years, 5 months ago) by yamt
Branch: MAIN
Changes since 1.228: +3 -2 lines
Diff to previous 1.228 (colored)

move buffer queue related stuffs from buf.h to their own header, bufq.h.

Revision 1.202.2.7 / (download) - annotate - [select for diffs], Tue Oct 19 15:57:29 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.202.2.6: +74 -31 lines
Diff to previous 1.202.2.6 (colored)

Sync with HEAD

Revision 1.228 / (download) - annotate - [select for diffs], Sun Sep 26 09:00:37 2004 UTC (19 years, 6 months ago) by dogcow
Branch: MAIN
Changes since 1.227: +3 -3 lines
Diff to previous 1.227 (colored)

Fix debug message output args to match yamt's src/sys/sys/buf.h changes.

Revision 1.227 / (download) - annotate - [select for diffs], Sat Sep 25 04:11:23 2004 UTC (19 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.226: +73 -30 lines
Diff to previous 1.226 (colored)

Add support for wedges to the SCSI disk driver.

Revision 1.202.2.6 / (download) - annotate - [select for diffs], Tue Sep 21 13:33:24 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.202.2.5: +6 -6 lines
Diff to previous 1.202.2.5 (colored)

Fix the sync with head I botched.

Revision 1.202.2.5 / (download) - annotate - [select for diffs], Sat Sep 18 14:51:25 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.202.2.4: +54 -73 lines
Diff to previous 1.202.2.4 (colored)

Sync with HEAD.

Revision 1.226 / (download) - annotate - [select for diffs], Fri Sep 17 23:43:17 2004 UTC (19 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.225: +4 -4 lines
Diff to previous 1.225 (colored)

Remove the "xfer" argument to scsipi_command().

Revision 1.225 / (download) - annotate - [select for diffs], Fri Sep 17 23:35:13 2004 UTC (19 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.224: +3 -5 lines
Diff to previous 1.224 (colored)

In places where we've already called scsipi_make_xs(), call scsipi_execute_xs()
directly rather than going through scsipi_command().

Revision 1.224 / (download) - annotate - [select for diffs], Fri Sep 17 23:10:51 2004 UTC (19 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.223: +34 -58 lines
Diff to previous 1.223 (colored)

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.216.2.3 / (download) - annotate - [select for diffs], Sat Sep 11 12:55:11 2004 UTC (19 years, 7 months ago) by he
Branch: 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
Changes since 1.216.2.2: +66 -23 lines
Diff to previous 1.216.2.2 (colored) to branchpoint 1.216 (colored) next main 1.217 (colored)

Pull up revisions 1.221-1.223 (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.223 / (download) - annotate - [select for diffs], Thu Sep 9 19:35:32 2004 UTC (19 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.222: +20 -13 lines
Diff to previous 1.222 (colored)

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.222 / (download) - annotate - [select for diffs], Mon Sep 6 20:38:14 2004 UTC (19 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.221: +3 -3 lines
Diff to previous 1.221 (colored)

Fix comment: xxstart() can also be called from xxrestart()

Revision 1.202.2.4 / (download) - annotate - [select for diffs], Fri Sep 3 12:45:39 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.202.2.3: +50 -15 lines
Diff to previous 1.202.2.3 (colored)

Sync with HEAD

Revision 1.221 / (download) - annotate - [select for diffs], Fri Aug 27 20:37:28 2004 UTC (19 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.220: +50 -15 lines
Diff to previous 1.220 (colored)

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.202.2.3 / (download) - annotate - [select for diffs], Wed Aug 25 06:58:43 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.202.2.2: +108 -181 lines
Diff to previous 1.202.2.2 (colored)

Sync with HEAD.

Revision 1.220 / (download) - annotate - [select for diffs], Sat Aug 21 22:02:31 2004 UTC (19 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.219: +108 -181 lines
Diff to previous 1.219 (colored)

Use ANSI function decls and make use of static.

Revision 1.202.2.2 / (download) - annotate - [select for diffs], Tue Aug 3 10:51:15 2004 UTC (19 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.202.2.1: +714 -104 lines
Diff to previous 1.202.2.1 (colored)

Sync with HEAD

Revision 1.216.2.2 / (download) - annotate - [select for diffs], Fri Jul 2 17:10:54 2004 UTC (19 years, 9 months ago) by he
Branch: netbsd-2-0
Changes since 1.216.2.1: +163 -149 lines
Diff to previous 1.216.2.1 (colored) to branchpoint 1.216 (colored)

Pull up revisions 1.218-1.219 (requested by mycroft in ticket #572):
  Several fixes mostly related to USB:
   o Separate page 4/5 reading into separate functions.  For
     ``removeable'' devices, try page 5 first.  Fixes problem
     with some broken USB devices which do not handle page 4
     correctly.
   o Add prototypes for recently added functions.

Revision 1.219 / (download) - annotate - [select for diffs], Mon Jun 28 20:24:16 2004 UTC (19 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.218: +7 -2 lines
Diff to previous 1.218 (colored)

Add prototypes for the new functions added in previous commit.

Revision 1.218 / (download) - annotate - [select for diffs], Mon Jun 28 16:43:49 2004 UTC (19 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.217: +158 -149 lines
Diff to previous 1.217 (colored)

Separate page 4/5 reading into separate functions.  For "removable" devices,
try page 5 (flex geometry) first.  This fixes problems with some broken USB
devices that do not handle page 4 correctly (rather than returning nothing,
or stalling, they return the CSW where there should be data).

Revision 1.216.2.1 / (download) - annotate - [select for diffs], Sat May 29 14:21:18 2004 UTC (19 years, 10 months ago) by tron
Branch: netbsd-2-0
Changes since 1.216: +20 -6 lines
Diff to previous 1.216 (colored)

Pull up revision 1.217 (requested by bouyer in ticket #399):
If READ_FORMAT_CAPACITIES fails with "Medium Format Corrupted" ASC/ASQ error,
handle it as if the drive was not formatted, so that "scsictl sdx format"
can open the raw device.

Revision 1.217 / (download) - annotate - [select for diffs], Fri May 21 21:14:11 2004 UTC (19 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.216: +20 -6 lines
Diff to previous 1.216 (colored)

If READ_FORMAT_CAPACITIES fails with "Medium Format Corrupted" ASC/ASQ error,
handle it as if the drive was not formatted, so that "scsictl sdx format"
can open the raw device.

Revision 1.216 / (download) - annotate - [select for diffs], Sun Mar 14 00:17:37 2004 UTC (20 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.215: +3 -3 lines
Diff to previous 1.215 (colored)

Use scsipi_adapter_minphys().

Revision 1.215 / (download) - annotate - [select for diffs], Sat Feb 28 06:28:48 2004 UTC (20 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.214: +4 -8 lines
Diff to previous 1.214 (colored)

change the way to handle NEW_BUFQ_STRATEGY option.
instead of putting #ifdefs into each drivers,
use a global variable to indicate default strategy.

XXX should have a way to specify other strategies.

Revision 1.214 / (download) - annotate - [select for diffs], Tue Dec 23 13:12:25 2003 UTC (20 years, 3 months ago) by pk
Branch: MAIN
Changes since 1.213: +43 -21 lines
Diff to previous 1.213 (colored)

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

XXX this applies to the `page 4' case. The `page 5' didn't consider the
possible presence of a block descriptor at all, though it did allow the
device to return one.  While that's fixed now, the `page 5' mode sense
does not use the `disable block descriptors' bit.

I'm not sure we should bother with this at all..

Revision 1.213 / (download) - annotate - [select for diffs], Wed Oct 29 21:26:43 2003 UTC (20 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.212: +2 -4 lines
Diff to previous 1.212 (colored)

Back out the bogus initializer -- the compiler bug is fixed.

Revision 1.212 / (download) - annotate - [select for diffs], Tue Oct 28 02:01:46 2003 UTC (20 years, 5 months ago) by cl
Branch: MAIN
Changes since 1.211: +3 -3 lines
Diff to previous 1.211 (colored)

note 'm68k {u,}int64_t used uninitialized' bug.
add reference to gcc bug report.
mark all (known) occurrences.

Revision 1.211 / (download) - annotate - [select for diffs], Mon Oct 27 23:03:05 2003 UTC (20 years, 5 months ago) by fredb
Branch: MAIN
Changes since 1.210: +4 -2 lines
Diff to previous 1.210 (colored)

Appease gcc3 -Wno-uninitialized (even though blkno is clearly assigned in
each branch of a conditional).

Revision 1.210 / (download) - annotate - [select for diffs], Thu Sep 18 06:55:53 2003 UTC (20 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.209: +11 -16 lines
Diff to previous 1.209 (colored)

Whoops, make sure 6-byte commands work again.

Revision 1.209 / (download) - annotate - [select for diffs], Thu Sep 18 00:06:36 2003 UTC (20 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.208: +585 -32 lines
Diff to previous 1.208 (colored)

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.208 / (download) - annotate - [select for diffs], Sat Sep 13 15:49:05 2003 UTC (20 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.207: +3 -3 lines
Diff to previous 1.207 (colored)

Don't be silent if there is no media present.

Revision 1.207 / (download) - annotate - [select for diffs], Sat Sep 13 14:44:50 2003 UTC (20 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.206: +15 -11 lines
Diff to previous 1.206 (colored)

Make sure the "raw partition" can always be opened again.

Revision 1.206 / (download) - annotate - [select for diffs], Tue Sep 9 02:43:35 2003 UTC (20 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.205: +4 -4 lines
Diff to previous 1.205 (colored)

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.205 / (download) - annotate - [select for diffs], Mon Sep 8 23:43:35 2003 UTC (20 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.204: +7 -6 lines
Diff to previous 1.204 (colored)

Fix an error path where we might scsipi_prevent() on a non-removable device.

Revision 1.204 / (download) - annotate - [select for diffs], Mon Sep 8 18:51:38 2003 UTC (20 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.203: +29 -17 lines
Diff to previous 1.203 (colored)

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.203 / (download) - annotate - [select for diffs], Sun Sep 7 22:11:24 2003 UTC (20 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.202: +3 -4 lines
Diff to previous 1.202 (colored)

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.202.2.1 / (download) - annotate - [select for diffs], Wed Jul 2 15:26:18 2003 UTC (20 years, 9 months ago) by darrenr
Branch: ktrace-lwp
Changes since 1.202: +9 -9 lines
Diff to previous 1.202 (colored)

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.202 / (download) - annotate - [select for diffs], Sun Jun 29 22:30:42 2003 UTC (20 years, 9 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.201: +7 -7 lines
Diff to previous 1.201 (colored)

Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.201 / (download) - annotate - [select for diffs], Sat Jun 28 14:21:44 2003 UTC (20 years, 9 months ago) by darrenr
Branch: MAIN
Changes since 1.200: +9 -9 lines
Diff to previous 1.200 (colored)

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.200 / (download) - annotate - [select for diffs], Tue May 13 03:00:07 2003 UTC (20 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.199: +10 -9 lines
Diff to previous 1.199 (colored)

Use aprint*().

Revision 1.199 / (download) - annotate - [select for diffs], Sat May 10 23:12:47 2003 UTC (20 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.198: +3 -3 lines
Diff to previous 1.198 (colored)

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.198 / (download) - annotate - [select for diffs], Fri May 2 08:45:28 2003 UTC (20 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.197: +3 -3 lines
Diff to previous 1.197 (colored)

Change return type of readdisklabel() to const char *
I hope I've found all the correct places!

Revision 1.197 / (download) - annotate - [select for diffs], Thu Apr 3 22:18:25 2003 UTC (21 years ago) by fvdl
Branch: MAIN
Changes since 1.196: +13 -7 lines
Diff to previous 1.196 (colored)

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.196 / (download) - annotate - [select for diffs], Thu Mar 20 05:49:21 2003 UTC (21 years, 1 month ago) by dbj
Branch: MAIN
Changes since 1.195: +3 -3 lines
Diff to previous 1.195 (colored)

use PRId64 to printf bp->b_blkno, which is of type daddr_t

Revision 1.195 / (download) - annotate - [select for diffs], Mon Feb 3 23:51:00 2003 UTC (21 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.194: +3 -3 lines
Diff to previous 1.194 (colored)

Test callout_pending(), not callout_active(), and eliminate now-unnecessary
callout_deactivate() calls.

Revision 1.194 / (download) - annotate - [select for diffs], Thu Jan 23 00:00:33 2003 UTC (21 years, 2 months ago) by bad
Branch: MAIN
Changes since 1.193: +3 -4 lines
Diff to previous 1.193 (colored)

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.169.2.14 / (download) - annotate - [select for diffs], Tue Jan 7 21:34:52 2003 UTC (21 years, 3 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.169.2.13: +3 -3 lines
Diff to previous 1.169.2.13 (colored) next main 1.170 (colored)

Sync with HEAD.

Revision 1.193 / (download) - annotate - [select for diffs], Mon Jan 6 20:30:38 2003 UTC (21 years, 3 months ago) by wiz
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base
Changes since 1.192: +3 -3 lines
Diff to previous 1.192 (colored)

writable, not writeable.

Revision 1.169.2.13 / (download) - annotate - [select for diffs], Thu Dec 19 00:48:18 2002 UTC (21 years, 4 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.169.2.12: +39 -21 lines
Diff to previous 1.169.2.12 (colored)

Sync with HEAD.

Revision 1.192 / (download) - annotate - [select for diffs], Sun Dec 15 01:55:44 2002 UTC (21 years, 4 months ago) by fvdl
Branch: MAIN
CVS Tags: gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.191: +39 -21 lines
Diff to previous 1.191 (colored)

Don't waste too much kernel stack space on (infrequent) ioctl operations,
use malloc instead for temp space.

Revision 1.169.2.12 / (download) - annotate - [select for diffs], Mon Nov 11 22:12:22 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.169.2.11: +9 -3 lines
Diff to previous 1.169.2.11 (colored)

Catch up to -current

Revision 1.191 / (download) - annotate - [select for diffs], Fri Nov 1 11:32:00 2002 UTC (21 years, 5 months ago) by mrg
Branch: MAIN
Changes since 1.190: +5 -4 lines
Diff to previous 1.190 (colored)

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.190 / (download) - annotate - [select for diffs], Wed Oct 23 09:13:48 2002 UTC (21 years, 5 months ago) by jdolecek
Branch: MAIN
CVS Tags: kqueue-aftermerge
Changes since 1.189: +3 -3 lines
Diff to previous 1.189 (colored)

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.189 / (download) - annotate - [select for diffs], Fri Oct 18 14:31:15 2002 UTC (21 years, 6 months ago) by junyoung
Branch: MAIN
CVS Tags: kqueue-beforemerge
Changes since 1.188: +7 -2 lines
Diff to previous 1.188 (colored)

Add option NEW_BUFQ_STRATEGY, a new buffer queue strategy for better
system responsiness under high disk I/O load.

OK'ed by Juergen Hannken-Illjes.

Revision 1.169.2.11 / (download) - annotate - [select for diffs], Fri Oct 18 02:44:19 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.169.2.10: +0 -4 lines
Diff to previous 1.169.2.10 (colored)

Catch up to -current.

Revision 1.177.2.5 / (download) - annotate - [select for diffs], Thu Oct 10 18:42:17 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.177.2.4: +22 -12 lines
Diff to previous 1.177.2.4 (colored) next main 1.178 (colored)

sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.188 / (download) - annotate - [select for diffs], Wed Sep 18 01:46:24 2002 UTC (21 years, 7 months ago) by chs
Branch: MAIN
CVS Tags: kqueue-base
Changes since 1.187: +2 -6 lines
Diff to previous 1.187 (colored)

remove all vesitages of dk_establish().

Revision 1.169.2.10 / (download) - annotate - [select for diffs], Tue Sep 17 21:21:17 2002 UTC (21 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.169.2.9: +21 -11 lines
Diff to previous 1.169.2.9 (colored)

Catch up to -current.

Revision 1.187 / (download) - annotate - [select for diffs], Fri Sep 6 13:18:43 2002 UTC (21 years, 7 months ago) by gehenna
Branch: MAIN
Changes since 1.186: +22 -8 lines
Diff to previous 1.186 (colored)

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.177.2.4 / (download) - annotate - [select for diffs], Fri Sep 6 08:46:25 2002 UTC (21 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.177.2.3: +9 -13 lines
Diff to previous 1.177.2.3 (colored)

sync kqueue branch with HEAD

Revision 1.183.2.4 / (download) - annotate - [select for diffs], Sat Aug 31 16:38:21 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.183.2.3: +3 -7 lines
Diff to previous 1.183.2.3 (colored) to branchpoint 1.183 (colored) next main 1.184 (colored)

catch up with -current.

Revision 1.186 / (download) - annotate - [select for diffs], Fri Aug 30 15:43:38 2002 UTC (21 years, 7 months ago) by hannken
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.185: +3 -7 lines
Diff to previous 1.185 (colored)

Remove the old device buffer queue interface.

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

Revision 1.183.2.3 / (download) - annotate - [select for diffs], Thu Aug 29 05:22:54 2002 UTC (21 years, 7 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.183.2.2: +5 -3 lines
Diff to previous 1.183.2.2 (colored) to branchpoint 1.183 (colored)

catch up with -current.

Revision 1.169.2.9 / (download) - annotate - [select for diffs], Thu Aug 1 02:45:45 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.169.2.8: +8 -8 lines
Diff to previous 1.169.2.8 (colored)

Catch up to -current.

Revision 1.185 / (download) - annotate - [select for diffs], Sun Jul 21 15:32:19 2002 UTC (21 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.184: +5 -3 lines
Diff to previous 1.184 (colored)

Rename bufq_init() to bufq_alloc().
Add bufq_free() to remove a buffer queue.
Avoid MALLOC while holding a spinlock.

From Chuck Silvers.

Revision 1.183.2.2 / (download) - annotate - [select for diffs], Sat Jul 20 11:35:09 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.183.2.1: +6 -8 lines
Diff to previous 1.183.2.1 (colored) to branchpoint 1.183 (colored)

catch up with -current.

Revision 1.184 / (download) - annotate - [select for diffs], Tue Jul 16 18:03:18 2002 UTC (21 years, 9 months ago) by hannken
Branch: MAIN
Changes since 1.183: +6 -8 lines
Diff to previous 1.183 (colored)

Implement a new device buffer queue interface.
One basic struct, a function to setup a queue with a specific strategy and
three macros to put buf's into the queue, get and remove the next buf or
get the next buf without removal.

The BUFQ_XXX interface will be removed in the future.
The B_ORDERED flag is not longer supported.

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

Revision 1.177.2.3 / (download) - annotate - [select for diffs], Sun Jun 23 17:48:49 2002 UTC (21 years, 9 months ago) by jdolecek
Branch: kqueue
Changes since 1.177.2.2: +5 -4 lines
Diff to previous 1.177.2.2 (colored)

catch up with -current on kqueue branch

Revision 1.169.2.8 / (download) - annotate - [select for diffs], Thu Jun 20 03:46:41 2002 UTC (21 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.169.2.7: +5 -4 lines
Diff to previous 1.169.2.7 (colored)

Catch up to -current.

Revision 1.183.2.1 / (download) - annotate - [select for diffs], Thu May 16 11:40:54 2002 UTC (21 years, 11 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.183: +22 -8 lines
Diff to previous 1.183 (colored)

Add the block/character device switches.
Replace the direct-access to devsw table with calling devsw API.

Revision 1.183 / (download) - annotate - [select for diffs], Wed May 15 13:01:27 2002 UTC (21 years, 11 months ago) by bouyer
Branch: 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
Changes since 1.182: +3 -3 lines
Diff to previous 1.182 (colored)

The number of sector is unsigned long, so use %lu to print it.

Revision 1.182 / (download) - annotate - [select for diffs], Sun May 5 15:16:30 2002 UTC (21 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.181: +4 -3 lines
Diff to previous 1.181 (colored)

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.169.2.7 / (download) - annotate - [select for diffs], Thu Feb 28 04:14:23 2002 UTC (22 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.169.2.6: +2 -2 lines
Diff to previous 1.169.2.6 (colored)

Catch up to -current.

Revision 1.169.2.6 / (download) - annotate - [select for diffs], Fri Jan 11 23:39:33 2002 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.169.2.5: +40 -3 lines
Diff to previous 1.169.2.5 (colored)

More catchup.

Revision 1.177.2.2 / (download) - annotate - [select for diffs], Thu Jan 10 19:58:25 2002 UTC (22 years, 3 months ago) by thorpej
Branch: kqueue
Changes since 1.177.2.1: +42 -3 lines
Diff to previous 1.177.2.1 (colored)

Sync kqueue branch with -current.

Revision 1.181 / (download) - annotate - [select for diffs], Wed Jan 9 04:12:11 2002 UTC (22 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: newlock-base, newlock, ifpoll-base, eeh-devprop-base, eeh-devprop
Changes since 1.180: +40 -3 lines
Diff to previous 1.180 (colored)

Add ioctls to get (DIOCGCACHE) and set (DIOCSCACHE) cache enables
on disks in a generic way.  Implement these ioctls for SCSI disks.

This is not fully fleshed-out yet, but it allows people to experiment
with disk caches more easily.

Revision 1.169.2.5 / (download) - annotate - [select for diffs], Tue Jan 8 00:31:53 2002 UTC (22 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.169.2.4: +2 -3 lines
Diff to previous 1.169.2.4 (colored)

Catch up to -current.

Revision 1.180 / (download) - annotate - [select for diffs], Thu Nov 15 09:48:17 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.179: +2 -3 lines
Diff to previous 1.179 (colored)

don't need <sys/types.h> when including <sys/param.h>

Revision 1.169.2.4 / (download) - annotate - [select for diffs], Wed Nov 14 19:16:04 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.169.2.3: +4 -1 lines
Diff to previous 1.169.2.3 (colored)

Catch up to -current.

Revision 1.179 / (download) - annotate - [select for diffs], Tue Nov 13 06:56:40 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.178: +4 -1 lines
Diff to previous 1.178 (colored)

add RCSIDs

Revision 1.178.2.2 / (download) - annotate - [select for diffs], Wed Sep 26 15:28:17 2001 UTC (22 years, 6 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.178.2.1: +37 -20 lines
Diff to previous 1.178.2.1 (colored) to branchpoint 1.178 (colored) next main 1.179 (colored)

* 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.178.2.1 / (download) - annotate - [select for diffs], Fri Sep 7 04:45:32 2001 UTC (22 years, 7 months ago) by thorpej
Branch: thorpej-devvp
Changes since 1.178: +60 -42 lines
Diff to previous 1.178 (colored)

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.169.2.3 / (download) - annotate - [select for diffs], Fri Aug 24 00:10:52 2001 UTC (22 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.169.2.2: +9 -9 lines
Diff to previous 1.169.2.2 (colored)

Catch up with -current.

Revision 1.177.2.1 / (download) - annotate - [select for diffs], Fri Aug 3 04:13:32 2001 UTC (22 years, 8 months ago) by lukem
Branch: kqueue
Changes since 1.177: +9 -9 lines
Diff to previous 1.177 (colored)

update to -current

Revision 1.178 / (download) - annotate - [select for diffs], Wed Jul 18 18:21:05 2001 UTC (22 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp
Changes since 1.177: +9 -9 lines
Diff to previous 1.177 (colored)

bzero -> memset

Revision 1.169.2.2 / (download) - annotate - [select for diffs], Thu Jun 21 20:05:59 2001 UTC (22 years, 10 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.169.2.1: +174 -155 lines
Diff to previous 1.169.2.1 (colored)

Catch up to -current.

Revision 1.177 / (download) - annotate - [select for diffs], Fri Jun 1 08:39:54 2001 UTC (22 years, 10 months ago) by bouyer
Branch: MAIN
Branch point for: kqueue
Changes since 1.176: +2 -2 lines
Diff to previous 1.176 (colored)

Fix typo in sddump() which caused core dumps to fail with ENXIO.

Revision 1.176 / (download) - annotate - [select for diffs], Tue May 29 01:02:39 2001 UTC (22 years, 10 months ago) by chs
Branch: MAIN
Changes since 1.175: +6 -6 lines
Diff to previous 1.175 (colored)

fix some problems in sddump() with uninitialized variables.

Revision 1.175 / (download) - annotate - [select for diffs], Tue May 22 18:59:57 2001 UTC (22 years, 10 months ago) by mjacob
Branch: MAIN
Changes since 1.174: +2 -2 lines
Diff to previous 1.174 (colored)

Make SDRETRIES an option you can dig out of opt_scsi.h.

Add SD_IO_TIMEOUT (an option in opt_scsi.h) also, which defaults to the
normal 60 * 1000 timeout for normal read/write commamds. This allows you
to shorten or lengthen the timeout as needed.

Revision 1.163.2.3 / (download) - annotate - [select for diffs], Sun May 6 20:49:15 2001 UTC (22 years, 11 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.163.2.2: +7 -5 lines
Diff to previous 1.163.2.2 (colored) to branchpoint 1.163 (colored) next main 1.164 (colored)

Pull up revision 1.174 (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.174 / (download) - annotate - [select for diffs], Sun May 6 18:30:56 2001 UTC (22 years, 11 months ago) by drochner
Branch: MAIN
Changes since 1.173: +7 -5 lines
Diff to previous 1.173 (colored)

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.163.2.2 / (download) - annotate - [select for diffs], Tue May 1 12:27:41 2001 UTC (22 years, 11 months ago) by he
Branch: netbsd-1-5
Changes since 1.163.2.1: +48 -4 lines
Diff to previous 1.163.2.1 (colored) to branchpoint 1.163 (colored)

Pull up revisions 1.167-1.168 (requested by fvdl):
  Increase the number of BSD disklabel partitions on i386 to 16.

Revision 1.173 / (download) - annotate - [select for diffs], Sat Apr 28 09:33:25 2001 UTC (22 years, 11 months ago) by tsutsui
Branch: MAIN
Changes since 1.172: +3 -1 lines
Diff to previous 1.172 (colored)

Don't forget to set XS_CTL_DATA_OUT (that was removed in previous).

Revision 1.172 / (download) - annotate - [select for diffs], Sat Apr 28 04:11:31 2001 UTC (22 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.171: +5 -4 lines
Diff to previous 1.171 (colored)

Use simple tags for read and write, unless B_ORDERED is set, in
which case we use an ordered tag.

Revision 1.171 / (download) - annotate - [select for diffs], Wed Apr 25 17:53:40 2001 UTC (22 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.170: +165 -151 lines
Diff to previous 1.170 (colored)

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.169.2.1 / (download) - annotate - [select for diffs], Mon Apr 9 01:57:28 2001 UTC (23 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.169: +15 -8 lines
Diff to previous 1.169 (colored)

Catch up with -current.

Revision 1.151.2.9 / (download) - annotate - [select for diffs], Mon Mar 12 13:31:25 2001 UTC (23 years, 1 month ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.151.2.8: +14 -8 lines
Diff to previous 1.151.2.8 (colored) next main 1.152 (colored)

Sync with HEAD.

Revision 1.163.2.1 / (download) - annotate - [select for diffs], Sun Mar 11 22:25:30 2001 UTC (23 years, 1 month ago) by he
Branch: netbsd-1-5
Changes since 1.163: +15 -8 lines
Diff to previous 1.163 (colored)

Pull up revision 1.170 (requested by explorer):
  Fix a problem with some Hitachi drives by only issuing the ``lock
  media'' and ``unlock media'' commands to removable media.

Revision 1.170 / (download) - annotate - [select for diffs], Fri Mar 9 16:07:39 2001 UTC (23 years, 1 month ago) by explorer
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Changes since 1.169: +15 -8 lines
Diff to previous 1.169 (colored)

Only lock the pack in if the disk device is a removable one.  This fixes a
problem with Hitachi SCA drives

Revision 1.151.2.8 / (download) - annotate - [select for diffs], Thu Jan 18 09:23:35 2001 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.151.2.7: +45 -3 lines
Diff to previous 1.151.2.7 (colored)

Sync with head (for UBC+NFS fixes, mostly).

Revision 1.169 / (download) - annotate - [select for diffs], Mon Jan 8 02:03:48 2001 UTC (23 years, 3 months ago) by fvdl
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.168: +3 -3 lines
Diff to previous 1.168 (colored)

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.168 / (download) - annotate - [select for diffs], Sun Jan 7 18:09:03 2001 UTC (23 years, 3 months ago) by fvdl
Branch: MAIN
Changes since 1.167: +45 -3 lines
Diff to previous 1.167 (colored)

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.151.2.7 / (download) - annotate - [select for diffs], Wed Dec 13 18:29:06 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.151.2.6: +3 -3 lines
Diff to previous 1.151.2.6 (colored)

Make it compile again.

Revision 1.151.2.6 / (download) - annotate - [select for diffs], Wed Dec 13 15:50:13 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.151.2.5: +3 -1 lines
Diff to previous 1.151.2.5 (colored)

Sync with HEAD (for UBC fixes).

Revision 1.151.2.5 / (download) - annotate - [select for diffs], Fri Dec 8 09:12:41 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.151.2.4: +16 -8 lines
Diff to previous 1.151.2.4 (colored)

Sync with HEAD.

Revision 1.167 / (download) - annotate - [select for diffs], Fri Dec 8 02:30:51 2000 UTC (23 years, 4 months ago) by augustss
Branch: MAIN
Changes since 1.166: +4 -2 lines
Diff to previous 1.166 (colored)

Don't access (in core) disk label of a removable disk that is not there.

Revision 1.166 / (download) - annotate - [select for diffs], Fri Nov 24 00:17:35 2000 UTC (23 years, 4 months ago) by chs
Branch: MAIN
Changes since 1.165: +15 -5 lines
Diff to previous 1.165 (colored)

avoid division and remainder operations for devices where
the sector size is DEV_BSIZE (ie. practically everything).

Revision 1.165 / (download) - annotate - [select for diffs], Wed Nov 22 00:32:24 2000 UTC (23 years, 4 months ago) by soren
Branch: MAIN
Changes since 1.164: +2 -4 lines
Diff to previous 1.164 (colored)

Remove obsolete comment.

Revision 1.151.2.4 / (download) - annotate - [select for diffs], Mon Nov 20 09:59:27 2000 UTC (23 years, 5 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.151.2.3: +57 -48 lines
Diff to previous 1.151.2.3 (colored)

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.164 / (download) - annotate - [select for diffs], Wed Jul 5 23:31:13 2000 UTC (23 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.163: +1 -15 lines
Diff to previous 1.163 (colored)

Garbage-collect __BDEVSW_DUMP_OLD_TYPE.

Revision 1.161.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:08:16 2000 UTC (23 years, 9 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.161: +4 -3 lines
Diff to previous 1.161 (colored) next main 1.162 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.163 / (download) - annotate - [select for diffs], Fri Jun 9 08:54:26 2000 UTC (23 years, 10 months ago) by enami
Branch: 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
Changes since 1.162: +2 -2 lines
Diff to previous 1.162 (colored)

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.162 / (download) - annotate - [select for diffs], Tue May 30 01:08:25 2000 UTC (23 years, 10 months ago) by augustss
Branch: MAIN
Changes since 1.161: +3 -2 lines
Diff to previous 1.161 (colored)

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.161 / (download) - annotate - [select for diffs], Tue May 23 10:20:14 2000 UTC (23 years, 10 months ago) by bouyer
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.160: +13 -2 lines
Diff to previous 1.160 (colored)

sd_interpret_sense() can be called from interrupt context; call scsipi_start()
with XS_CTL_ASYNC if the failed command was called with XS_CTL_ASYNC.
Add a SDF_RESTART flag to keep state, cleared in sddone().
A mounted disk can now spin down, it will propely spin up at the next access.

Revision 1.160 / (download) - annotate - [select for diffs], Tue May 16 05:45:52 2000 UTC (23 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.159: +2 -2 lines
Diff to previous 1.159 (colored)

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.159 / (download) - annotate - [select for diffs], Thu Mar 30 00:00:56 2000 UTC (24 years ago) by augustss
Branch: MAIN
Changes since 1.158: +4 -4 lines
Diff to previous 1.158 (colored)

Get rid of register declarations.

Revision 1.158 / (download) - annotate - [select for diffs], Mon Mar 13 23:52:37 2000 UTC (24 years, 1 month ago) by soren
Branch: MAIN
Changes since 1.157: +2 -2 lines
Diff to previous 1.157 (colored)

Fix doubled 'the's in comments.

Revision 1.157 / (download) - annotate - [select for diffs], Mon Feb 7 20:16:57 2000 UTC (24 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.156: +29 -21 lines
Diff to previous 1.156 (colored)

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.156 / (download) - annotate - [select for diffs], Tue Jan 25 20:42:33 2000 UTC (24 years, 2 months ago) by drochner
Branch: MAIN
Changes since 1.155: +5 -2 lines
Diff to previous 1.155 (colored)

try to dtrt for sector sizes <DEV_BSIZE (at least, don't divide by 0)

Revision 1.155 / (download) - annotate - [select for diffs], Fri Jan 21 23:40:00 2000 UTC (24 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.154: +8 -8 lines
Diff to previous 1.154 (colored)

Update for sys/buf.h/disksort_*() changes.

Revision 1.149.2.2 / (download) - annotate - [select for diffs], Mon Dec 27 18:35:36 1999 UTC (24 years, 3 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.149.2.1: +7 -7 lines
Diff to previous 1.149.2.1 (colored) next main 1.150 (colored)

Pull up to last week's -current.

Revision 1.154 / (download) - annotate - [select for diffs], Thu Dec 23 21:23:30 1999 UTC (24 years, 3 months ago) by leo
Branch: MAIN
Changes since 1.153: +12 -1 lines
Diff to previous 1.153 (colored)

Implement the DIOCKLABEL ioctl. Through this ioctl it it possible keep the
disklabel on the last close or to drop it.

Revision 1.149.2.1 / (download) - annotate - [select for diffs], Tue Dec 21 23:19:55 1999 UTC (24 years, 4 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.149: +38 -13 lines
Diff to previous 1.149 (colored)

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.151.4.1 / (download) - annotate - [select for diffs], Mon Nov 15 00:41:27 1999 UTC (24 years, 5 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.151: +5 -5 lines
Diff to previous 1.151 (colored) next main 1.152 (colored)

Sync with -current

Revision 1.153 / (download) - annotate - [select for diffs], Wed Nov 3 20:50:17 1999 UTC (24 years, 5 months ago) by matt
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, fvdl-softdep-base
Changes since 1.152: +2 -2 lines
Diff to previous 1.152 (colored)

use __vax__ and __i386__ instead of vax and i386

Revision 1.151.2.3 / (download) - annotate - [select for diffs], Mon Nov 1 22:54:20 1999 UTC (24 years, 5 months ago) by thorpej
Branch: thorpej_scsipi
Changes since 1.151.2.2: +10 -10 lines
Diff to previous 1.151.2.2 (colored)

Fixup the SC_DEBUG() stuff for the new world order.

Revision 1.152 / (download) - annotate - [select for diffs], Sat Oct 30 16:35:12 1999 UTC (24 years, 5 months ago) by bouyer
Branch: MAIN
CVS Tags: comdex-fall-1999-base, comdex-fall-1999
Changes since 1.151: +4 -4 lines
Diff to previous 1.151 (colored)

In sddump(), check sd->sc_dev.dv_flags once sd has been initialised.
Patch supplied by tsutsui@ceres.dti.ne.jp in kern/8708.

Revision 1.151.2.2 / (download) - annotate - [select for diffs], Wed Oct 20 20:39:29 1999 UTC (24 years, 6 months ago) by thorpej
Branch: thorpej_scsipi
Changes since 1.151.2.1: +1 -2 lines
Diff to previous 1.151.2.1 (colored)

Remove an unnecessary comment regarding XS_CTL_NOSLEEP.

Revision 1.151.2.1 / (download) - annotate - [select for diffs], Tue Oct 19 17:39:39 1999 UTC (24 years, 6 months ago) by thorpej
Branch: thorpej_scsipi
Changes since 1.151: +136 -109 lines
Diff to previous 1.151 (colored)

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.151 / (download) - annotate - [select for diffs], Sun Oct 17 09:44:48 1999 UTC (24 years, 6 months ago) by ragge
Branch: MAIN
Branch point for: thorpej_scsipi, fvdl-softdep
Changes since 1.150: +2 -2 lines
Diff to previous 1.150 (colored)

Don't call dk_establish() on vax either.

Revision 1.150 / (download) - annotate - [select for diffs], Sun Oct 17 06:22:05 1999 UTC (24 years, 6 months ago) by enami
Branch: MAIN
Changes since 1.149: +3 -3 lines
Diff to previous 1.149 (colored)

Cosmetic changes.

Revision 1.149 / (download) - annotate - [select for diffs], Thu Sep 30 22:57:54 1999 UTC (24 years, 6 months ago) by thorpej
Branch: MAIN
Branch point for: wrstuden-devbsize
Changes since 1.148: +23 -19 lines
Diff to previous 1.148 (colored)

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.148 / (download) - annotate - [select for diffs], Tue Sep 21 03:10:00 1999 UTC (24 years, 7 months ago) by enami
Branch: MAIN
Changes since 1.147: +3 -2 lines
Diff to previous 1.147 (colored)

Calculate the correct device minor of the first partition.

Revision 1.147 / (download) - annotate - [select for diffs], Sat Sep 11 21:42:58 1999 UTC (24 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.146: +89 -2 lines
Diff to previous 1.146 (colored)

Implement detaching SCSI and ATAPI disks.

Revision 1.146 / (download) - annotate - [select for diffs], Thu Aug 26 09:28:17 1999 UTC (24 years, 7 months ago) by hannken
Branch: MAIN
Changes since 1.145: +17 -5 lines
Diff to previous 1.145 (colored)

Make `sc_ops->sdo_flush' synchronous. The flags `SDF_FLUSHING' and
`SDF_DIRTY' were never reset because `sddone' doesn't get called from
synchronous scsi commands.

Revision 1.144.4.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:19:13 1999 UTC (24 years, 10 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.144: +13 -7 lines
Diff to previous 1.144 (colored) next main 1.145 (colored)

Sync w/ -current.

Revision 1.145 / (download) - annotate - [select for diffs], Mon May 31 12:05:39 1999 UTC (24 years, 10 months ago) by lukem
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.144: +13 -7 lines
Diff to previous 1.144 (colored)

* use format_bytes() to display the disk size
* wrap a couple of printf()s

Revision 1.144 / (download) - annotate - [select for diffs], Sun Feb 28 17:14:57 1999 UTC (25 years, 1 month ago) by explorer
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: chs-ubc2
Changes since 1.143: +3 -2 lines
Diff to previous 1.143 (colored)

Update to slightly altered rnd_attach_source() api

Revision 1.143 / (download) - annotate - [select for diffs], Wed Feb 10 12:29:50 1999 UTC (25 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.142: +5 -3 lines
Diff to previous 1.142 (colored)

Abort transfer if b_blkno is negative. Closes PR kern/5553 by Johan Danielsson.

Revision 1.142 / (download) - annotate - [select for diffs], Mon Feb 8 16:33:18 1999 UTC (25 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.141: +27 -5 lines
Diff to previous 1.141 (colored)

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.141 / (download) - annotate - [select for diffs], Fri Jan 29 11:17:59 1999 UTC (25 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.140: +11 -5 lines
Diff to previous 1.140 (colored)

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.140 / (download) - annotate - [select for diffs], Tue Jan 26 13:59:44 1999 UTC (25 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.139: +49 -30 lines
Diff to previous 1.139 (colored)

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.139 / (download) - annotate - [select for diffs], Tue Jan 19 10:57:11 1999 UTC (25 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.138: +9 -14 lines
Diff to previous 1.138 (colored)

Move test for SDEV_NOSTARTUNIT quirk from sd.c to scsipi_start().
Add a SDEV_NOSTARTUNIT quirk entry for BCD-16X 1997-04-25", "", "VER 2.2"
CD-rom (from Michael Santos).

Revision 1.138 / (download) - annotate - [select for diffs], Tue Dec 8 00:18:46 1998 UTC (25 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach
Changes since 1.137: +4 -2 lines
Diff to previous 1.137 (colored)

When closing, wait for pending xfers to drain before unlocking the door,
and wait again before deleting the reference to the adapter.

Revision 1.137 / (download) - annotate - [select for diffs], Fri Nov 20 00:35:40 1998 UTC (25 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.136: +15 -2 lines
Diff to previous 1.136 (colored)

Add adapter reference counting for SCSI and ATAPI devices.

Revision 1.136 / (download) - annotate - [select for diffs], Tue Nov 17 14:46:26 1998 UTC (25 years, 5 months ago) by bouyer
Branch: MAIN
Changes since 1.135: +1 -22 lines
Diff to previous 1.135 (colored)

The ATAPI-specific hack is not needed any more.

Revision 1.135 / (download) - annotate - [select for diffs], Mon Aug 17 19:30:38 1998 UTC (25 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc-base, chs-ubc
Changes since 1.134: +3 -2 lines
Diff to previous 1.134 (colored)

Only mark the disk dirty if we write.

Revision 1.134 / (download) - annotate - [select for diffs], Mon Aug 17 00:49:03 1998 UTC (25 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.133: +23 -16 lines
Diff to previous 1.133 (colored)

Assign my copyrights to TNF.

Revision 1.133 / (download) - annotate - [select for diffs], Sat Aug 15 01:32:55 1998 UTC (25 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.132: +2 -2 lines
Diff to previous 1.132 (colored)

Should not use SCSI_POLL if the system is not cold.

Revision 1.132 / (download) - annotate - [select for diffs], Sat Aug 15 01:10:54 1998 UTC (25 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.131: +49 -1 lines
Diff to previous 1.131 (colored)

Keep track if the disk has had done i/o, making it dirty.  On last close,
or at shutdown, flush the cache if the disk is still dirty and it support
cache flushing.  Fixes PRs #5588 (Jim Bernard) and #5589 (Justin Gibbs).

Revision 1.128.2.2 / (download) - annotate - [select for diffs], Sat Aug 8 03:06:52 1998 UTC (25 years, 8 months ago) by eeh
Branch: eeh-paddr_t
Changes since 1.128.2.1: +1099 -0 lines
Diff to previous 1.128.2.1 (colored) to branchpoint 1.128 (colored) next main 1.129 (colored)

Revert cdevsw mmap routines to return int.

Revision 1.131 / (download) - annotate - [select for diffs], Wed Aug 5 16:29:06 1998 UTC (25 years, 8 months ago) by drochner
Branch: MAIN
Changes since 1.130: +14 -6 lines
Diff to previous 1.130 (colored)

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.130 / (download) - annotate - [select for diffs], Fri Jul 31 00:42:31 1998 UTC (25 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.129: +2 -2 lines
Diff to previous 1.129 (colored)

Typo.

Revision 1.129 / (download) - annotate - [select for diffs], Thu Jul 30 23:57:07 1998 UTC (25 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.128: +4 -2 lines
Diff to previous 1.128 (colored)

From cd.c: call disk_unbusy() if we are unable to enqueue our command.

Revision 1.128.2.1, Thu Jul 30 00:49:21 1998 UTC (25 years, 8 months ago) by eeh
Branch: eeh-paddr_t
Changes since 1.128: +0 -1097 lines
FILE REMOVED

file sd.c was added on branch eeh-paddr_t on 1998-08-08 03:06:52 +0000

Revision 1.128 / (download) - annotate - [select for diffs], Thu Jul 30 00:49:21 1998 UTC (25 years, 8 months ago) by mjacob
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.127: +2 -2 lines
Diff to previous 1.127 (colored)

opt_scsiverbose.h now is opt_scsi.h and contains the defopted
SCSIVERBOSE and the new ST_ENABLE_EARLYWARN.

Revision 1.127 / (download) - annotate - [select for diffs], Wed Jul 15 20:21:12 1998 UTC (25 years, 9 months ago) by mjacob
Branch: MAIN
Changes since 1.126: +67 -2 lines
Diff to previous 1.126 (colored)

Fix for kern/3835: add an sd sense handler. If we get a check condition/sense
data ASC/ASCQ of 0x04/0x01 (logical unit not ready, initialization in progress),
hang out for 5 seconds and return a RETRY THE OPERATION command. If we
get a check condition/sense data ASC/ASCQ of 0x04/0x02 (logical unit not
ready, initialization command required), send a polled/nosleep START UNIT
command and return a RETRY THE OPERATION command if that succeeds.

Don't send a START UNIT to a disk quirked as SDEV_NO_START. Don't send
a START UNIT to removable media. The reason for the latter is to not
just blindly spin up new (maybe changed) media.

I should note that I've successfully made this work with the ISP host
adapter so far. Other host adapters will need some work to be able
to manage or reasonably fail NOSLEEP/POLL commands while in this
state. Alternatively, the internal SCSI midlayer structure has got
to allow for more controlled error recovery (e.g., restart queues
controlled by the target driver).

Revision 1.126 / (download) - annotate - [select for diffs], Tue Mar 3 23:15:36 1998 UTC (26 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.125: +2 -2 lines
Diff to previous 1.125 (colored)

in the ATAPI bug workaround code ("HACK"), don't forget to set
SCSI_AUTOCONF when executing SCSI commands.

Revision 1.125 / (download) - annotate - [select for diffs], Thu Jan 15 18:59:03 1998 UTC (26 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.124: +3 -1 lines
Diff to previous 1.124 (colored)

#if some bug workaround code which only needs to be compiled if
ATAPI 'sd's are present.

Revision 1.124 / (download) - annotate - [select for diffs], Thu Jan 15 02:21:38 1998 UTC (26 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.123: +74 -278 lines
Diff to previous 1.123 (colored)

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.123 / (download) - annotate - [select for diffs], Mon Jan 12 09:49:16 1998 UTC (26 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.122: +2 -4 lines
Diff to previous 1.122 (colored)

Adjust for changes to config.

Revision 1.122 / (download) - annotate - [select for diffs], Sat Oct 18 19:51:08 1997 UTC (26 years, 6 months ago) by thorpej
Branch: 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, netbsd-1-3
Changes since 1.121: +8 -8 lines
Diff to previous 1.121 (colored)

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.116.2.4 / (download) - annotate - [select for diffs], Tue Oct 14 10:25:30 1997 UTC (26 years, 6 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.116.2.3: +114 -79 lines
Diff to previous 1.116.2.3 (colored) to branchpoint 1.116 (colored) next main 1.117 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.121 / (download) - annotate - [select for diffs], Mon Oct 13 00:47:58 1997 UTC (26 years, 6 months ago) by explorer
Branch: MAIN
CVS Tags: marc-pcmcia-base
Changes since 1.120: +11 -1 lines
Diff to previous 1.120 (colored)

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.120 / (download) - annotate - [select for diffs], Fri Oct 10 01:09:10 1997 UTC (26 years, 6 months ago) by explorer
Branch: MAIN
Changes since 1.119: +11 -2 lines
Diff to previous 1.119 (colored)

Add hooks to insert timing info into the random system

Revision 1.119 / (download) - annotate - [select for diffs], Wed Oct 8 23:05:24 1997 UTC (26 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.118: +29 -12 lines
Diff to previous 1.118 (colored)

Implement DIOCGDEFLABEL.

Revision 1.118 / (download) - annotate - [select for diffs], Wed Oct 1 01:19:17 1997 UTC (26 years, 6 months ago) by enami
Branch: MAIN
Changes since 1.117: +66 -67 lines
Diff to previous 1.117 (colored)

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.116.2.3 / (download) - annotate - [select for diffs], Mon Sep 22 06:33:42 1997 UTC (26 years, 7 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.116.2.2: +3 -1 lines
Diff to previous 1.116.2.2 (colored) to branchpoint 1.116 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.117 / (download) - annotate - [select for diffs], Sat Sep 20 18:56:30 1997 UTC (26 years, 7 months ago) by mjacob
Branch: MAIN
Changes since 1.116: +3 -1 lines
Diff to previous 1.116 (colored)

Allow SDOUTSTANDING to be defined elsewhere (e.g., config file).

Revision 1.116.2.2 / (download) - annotate - [select for diffs], Wed Aug 27 23:33:32 1997 UTC (26 years, 7 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.116.2.1: +1199 -0 lines
Diff to previous 1.116.2.1 (colored) to branchpoint 1.116 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.116.2.1, Wed Aug 27 11:27:02 1997 UTC (26 years, 7 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.116: +0 -1199 lines
FILE REMOVED

file sd.c was added on branch marc-pcmcia on 1997-08-27 23:33:32 +0000

Revision 1.116 / (download) - annotate - [select for diffs], Wed Aug 27 11:27:02 1997 UTC (26 years, 7 months ago) by bouyer
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal
Branch point for: marc-pcmcia
Changes since 1.115: +92 -87 lines
Diff to previous 1.115 (colored)

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.114.2.1 / (download) - annotate - [select for diffs], Sat Aug 23 07:14:29 1997 UTC (26 years, 7 months ago) by thorpej
Changes since 1.114: +2 -2 lines
Diff to previous 1.114 (colored) next main 1.115 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.115 / (download) - annotate - [select for diffs], Mon Aug 4 07:16:49 1997 UTC (26 years, 8 months ago) by fair
Branch: MAIN
Changes since 1.114: +2 -2 lines
Diff to previous 1.114 (colored)

trivial change for PR#3815

Revision 1.114 / (download) - annotate - [select for diffs], Wed Jul 2 03:51:25 1997 UTC (26 years, 9 months ago) by phil
Branch: MAIN
Changes since 1.113: +3 -3 lines
Diff to previous 1.113 (colored)

Report actual disksize on finding a disk.
(From: der Mouse  <mouse@Rodents.Montreal.QC.CA>)

Revision 1.113 / (download) - annotate - [select for diffs], Tue Jun 24 00:28:36 1997 UTC (26 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: bouyer-scsipi
Changes since 1.112: +3 -2 lines
Diff to previous 1.112 (colored)

foosize()'s return value is in DEV_BSIZE units; adjust the size obtained
from the disklabel accordingly.

Revision 1.112 / (download) - annotate - [select for diffs], Wed Jun 18 20:38:59 1997 UTC (26 years, 10 months ago) by pk
Branch: MAIN
Changes since 1.111: +17 -9 lines
Diff to previous 1.111 (colored)

sdsize(): only call sdopen()/sdclose() if not already open, per the
current openmask.

Revision 1.111 / (download) - annotate - [select for diffs], Wed Apr 2 02:29:41 1997 UTC (27 years ago) by mycroft
Branch: MAIN
Changes since 1.110: +7 -10 lines
Diff to previous 1.110 (colored)

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.107.6.1 / (download) - annotate - [select for diffs], Wed Mar 12 21:25:51 1997 UTC (27 years, 1 month ago) by is
Changes since 1.107: +69 -4 lines
Diff to previous 1.107 (colored) next main 1.108 (colored)

Merge in changes from Trunk

Revision 1.100.4.3 / (download) - annotate - [select for diffs], Tue Mar 4 14:46:48 1997 UTC (27 years, 1 month ago) by mycroft
Changes since 1.100.4.2: +162 -46 lines
Diff to previous 1.100.4.2 (colored) next main 1.101 (colored)

Pull up support for fetching geometry info on optical disks.

Revision 1.110 / (download) - annotate - [select for diffs], Tue Mar 4 06:25:22 1997 UTC (27 years, 1 month ago) by mikel
Branch: MAIN
Changes since 1.109: +2 -2 lines
Diff to previous 1.109 (colored)

garbage collect unused variable (was this struct declaration orginally
  a typedef?); from Enami Tsugutomo in PR kern/3282.

Revision 1.109 / (download) - annotate - [select for diffs], Fri Feb 21 23:03:38 1997 UTC (27 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.108: +2 -1 lines
Diff to previous 1.108 (colored)

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.108 / (download) - annotate - [select for diffs], Fri Feb 21 21:51:59 1997 UTC (27 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.107: +67 -3 lines
Diff to previous 1.107 (colored)

Handle optical disks a little better, from Naofumi HONDA / MINOURA Makoto
in PR #3009, with some slight KNF from me.

Revision 1.107 / (download) - annotate - [select for diffs], Thu Dec 5 01:06:43 1996 UTC (27 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.106: +11 -2 lines
Diff to previous 1.106 (colored)

update these so they compile whether or not __BROKEN_INDIRECT_CONFIG
is defined.

Revision 1.100.4.2 / (download) - annotate - [select for diffs], Fri Nov 29 20:02:09 1996 UTC (27 years, 4 months ago) by thorpej
Changes since 1.100.4.1: +2 -1 lines
Diff to previous 1.100.4.1 (colored)

Start a mode sense with a clean sense buffer.
From David M. Stanhope <dms@celtech.com>, PR #2953.

Revision 1.106 / (download) - annotate - [select for diffs], Fri Nov 29 19:58:40 1996 UTC (27 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.105: +8 -1 lines
Diff to previous 1.105 (colored)

Start a mode sense with a clean sense buffer.
Fixes PR #2953, from David M. Stanhope <dms@celtech.com>.

Revision 1.105 / (download) - annotate - [select for diffs], Wed Oct 23 07:25:44 1996 UTC (27 years, 5 months ago) by matthias
Branch: MAIN
Changes since 1.104: +19 -9 lines
Diff to previous 1.104 (colored)

* At least the Teac FC-1 Shugart-SCSI bridgeboard does motor on/off
management by itself. But when it gets a start unit request, it keeps
the floppy motor running all the time. This adds code for dealing with
yet another quirk (SDEV_NOSTARTUNIT) that prevents sd.c from sending
start unit requests. A entry for the Teac FC-1 is added to the quirk
table.

Revision 1.104 / (download) - annotate - [select for diffs], Sat Oct 12 23:23:20 1996 UTC (27 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.103: +11 -11 lines
Diff to previous 1.103 (colored)

revert previous kprintf change

Revision 1.103 / (download) - annotate - [select for diffs], Thu Oct 10 23:34:22 1996 UTC (27 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.102: +11 -11 lines
Diff to previous 1.102 (colored)

printf -> kprintf, sprintf -> ksprintf

Revision 1.102 / (download) - annotate - [select for diffs], Fri Jul 5 16:19:16 1996 UTC (27 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.101: +75 -40 lines
Diff to previous 1.101 (colored)

- Apply PR/2535: Add support for flex scsi disks.
- Add a quirk called SCSI_NOMODESENSE for drives like the iomega jaz,
  that don't support mode sense.

Revision 1.100.4.1 / (download) - annotate - [select for diffs], Tue Jun 4 23:14:08 1996 UTC (27 years, 10 months ago) by thorpej
Changes since 1.100: +8 -1 lines
Diff to previous 1.100 (colored)

Update from trunk:

In sddump(), don't check the SDEV_MEDIA_LOADED bit of the device, since
that bit might have been cleared by successful unmounting of all filesystems
on the dump device, e.g. in the case of "reboot -d".

Revision 1.101 / (download) - annotate - [select for diffs], Tue Jun 4 23:12:14 1996 UTC (27 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.100: +8 -1 lines
Diff to previous 1.100 (colored)

In sddump(), don't check the SDEV_MEDIA_LOADED bit of the device, since
that bit might have been cleared by successful unmounting of all filesystems
on the dump device, e.g. in the case of "reboot -d".

Revision 1.100 / (download) - annotate - [select for diffs], Tue May 14 10:38:47 1996 UTC (27 years, 11 months ago) by leo
Branch: MAIN
Changes since 1.99: +2 -2 lines
Diff to previous 1.99 (colored)

Clear SDEV_MEDIA_LOADED bit on the last close of a device. This causes the
geometry info & the disklabel to be reloaded on each 'first-open' of the
device.

Revision 1.99 / (download) - annotate - [select for diffs], Tue May 14 00:10:37 1996 UTC (27 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.98: +7 -5 lines
Diff to previous 1.98 (colored)

Print the error code in the "not queued" message, to make debugging
a bit easier, and make sure a newline gets printed.

Revision 1.98 / (download) - annotate - [select for diffs], Sun May 5 19:52:53 1996 UTC (27 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.97: +3 -3 lines
Diff to previous 1.97 (colored)

Cleanup the rest of the SCSIDEBUG printfs. From Bernd Ernesti.

Revision 1.97 / (download) - annotate - [select for diffs], Fri May 3 19:48:22 1996 UTC (27 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.96: +4 -4 lines
Diff to previous 1.96 (colored)

- SCSIDEBUG printf() fixes.

Revision 1.96 / (download) - annotate - [select for diffs], Mon Apr 22 01:46:14 1996 UTC (28 years ago) by christos
Branch: MAIN
Changes since 1.95: +1 -2 lines
Diff to previous 1.95 (colored)

remove include of <sys/cpu.h>

Revision 1.95 / (download) - annotate - [select for diffs], Sat Mar 30 21:45:14 1996 UTC (28 years ago) by christos
Branch: MAIN
Changes since 1.94: +2 -2 lines
Diff to previous 1.94 (colored)

Eliminate scsi_conf.h.

Revision 1.94 / (download) - annotate - [select for diffs], Tue Mar 26 22:22:33 1996 UTC (28 years ago) by mycroft
Branch: MAIN
Changes since 1.93: +5 -1 lines
Diff to previous 1.93 (colored)

Put back dk_establish() for now.

Revision 1.93 / (download) - annotate - [select for diffs], Tue Mar 26 20:32:14 1996 UTC (28 years ago) by mycroft
Branch: MAIN
Changes since 1.92: +3 -8 lines
Diff to previous 1.92 (colored)

Increase *OUTSTANDING.
Remove old dk_establish() garbage.
Support the `ancient' bit in both drivers.

Revision 1.92 / (download) - annotate - [select for diffs], Sun Mar 24 07:36:11 1996 UTC (28 years ago) by mycroft
Branch: MAIN
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored)

Fix trivial oversight in last.

Revision 1.91 / (download) - annotate - [select for diffs], Tue Mar 19 03:05:15 1996 UTC (28 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.90: +16 -68 lines
Diff to previous 1.90 (colored)

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.90 / (download) - annotate - [select for diffs], Sun Mar 17 02:06:50 1996 UTC (28 years, 1 month ago) by pk
Branch: MAIN
Changes since 1.89: +4 -4 lines
Diff to previous 1.89 (colored)

Parentheses are your friends.

Revision 1.89 / (download) - annotate - [select for diffs], Sun Mar 17 00:59:50 1996 UTC (28 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.88: +16 -12 lines
Diff to previous 1.88 (colored)

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.88 / (download) - annotate - [select for diffs], Tue Mar 5 00:15:15 1996 UTC (28 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.87: +5 -3 lines
Diff to previous 1.87 (colored)

Normalize SCSI autoconfiguration output.
From Chris Demetriou <cgd@NetBSD.ORG>.  Fixes PR #1958.

Revision 1.87 / (download) - annotate - [select for diffs], Wed Feb 14 21:47:40 1996 UTC (28 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.86: +49 -33 lines
Diff to previous 1.86 (colored)

scsi prototypes

Revision 1.80.2.1 / (download) - annotate - [select for diffs], Sun Feb 4 05:47:05 1996 UTC (28 years, 2 months ago) by gwr
Changes since 1.80: +77 -18 lines
Diff to previous 1.80 (colored) next main 1.81 (colored)

Pull in rev 1.82 (Jason's fix to use 6-byte command blocks).

Revision 1.86 / (download) - annotate - [select for diffs], Tue Jan 30 18:24:47 1996 UTC (28 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.85: +9 -1 lines
Diff to previous 1.85 (colored)

Implement DIOCLOCK and DIOCEJECT.  DIOCEJECT is limited to removable
media.  Fixes PR #1975.

Revision 1.85 / (download) - annotate - [select for diffs], Fri Jan 12 22:43:33 1996 UTC (28 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.84: +5 -4 lines
Diff to previous 1.84 (colored)

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.84 / (download) - annotate - [select for diffs], Sun Jan 7 22:04:02 1996 UTC (28 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.83: +52 -29 lines
Diff to previous 1.83 (colored)

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.83 / (download) - annotate - [select for diffs], Thu Dec 7 21:54:24 1995 UTC (28 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.82: +1 -3 lines
Diff to previous 1.82 (colored)

Remove a couple of now unneeded assignments.

Revision 1.82 / (download) - annotate - [select for diffs], Thu Dec 7 19:46:00 1995 UTC (28 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.81: +8 -1 lines
Diff to previous 1.81 (colored)

In sdminphys(), add a comment about the semantics of the "length" field
in a 6-byte read/write cdb (namely, length == 0 really means 256), and
that we handle this conservatively by limiting the transfer to 255 blocks.
*sigh* One just never knows how a pre-scsi-1 device is going to behave.

Revision 1.81 / (download) - annotate - [select for diffs], Thu Dec 7 19:11:37 1995 UTC (28 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.80: +70 -18 lines
Diff to previous 1.80 (colored)

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.80 / (download) - annotate - [select for diffs], Tue Oct 10 02:53:01 1995 UTC (28 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.79: +8 -1 lines
Diff to previous 1.79 (colored)

Return EINVAL if something other than a whole number of blocks is requested.

Revision 1.79 / (download) - annotate - [select for diffs], Sat Sep 30 22:57:19 1995 UTC (28 years, 6 months ago) by pk
Branch: MAIN
Changes since 1.78: +2 -2 lines
Diff to previous 1.78 (colored)

Specify SCSI_DATA_OUT in sddump() (from John Kohl; PR#1482).

Revision 1.78 / (download) - annotate - [select for diffs], Tue Sep 26 19:27:01 1995 UTC (28 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.77: +1 -7 lines
Diff to previous 1.77 (colored)

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.77 / (download) - annotate - [select for diffs], Sat Aug 12 22:58:01 1995 UTC (28 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.76: +4 -4 lines
Diff to previous 1.76 (colored)

opri --> s

Revision 1.76 / (download) - annotate - [select for diffs], Sat Aug 12 21:36:49 1995 UTC (28 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.75: +3 -1 lines
Diff to previous 1.75 (colored)

Fix oversight in previous.

Revision 1.75 / (download) - annotate - [select for diffs], Sat Aug 12 20:31:46 1995 UTC (28 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.74: +18 -25 lines
Diff to previous 1.74 (colored)

minphys() functions really should return void.

Revision 1.74 / (download) - annotate - [select for diffs], Sat Aug 5 23:48:55 1995 UTC (28 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.73: +28 -30 lines
Diff to previous 1.73 (colored)

Use an intermediate variable to shorten label initialization code.

Revision 1.73 / (download) - annotate - [select for diffs], Mon Jul 24 06:56:48 1995 UTC (28 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.72: +3 -3 lines
Diff to previous 1.72 (colored)

update SCSI minphys routines' definitions to match standard minphys()
definition and usage.

Revision 1.72 / (download) - annotate - [select for diffs], Tue Jul 4 07:21:04 1995 UTC (28 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.71: +28 -18 lines
Diff to previous 1.71 (colored)

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.71 / (download) - annotate - [select for diffs], Mon Jun 26 05:16:55 1995 UTC (28 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.70: +72 -79 lines
Diff to previous 1.70 (colored)

implement new-style block device dump routine if __BDEVSW_DUMP_OLD_TYPE
not defined, otherwise use an "not implemented" stub.

Revision 1.70 / (download) - annotate - [select for diffs], Wed May 3 21:38:57 1995 UTC (28 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.69: +4 -4 lines
Diff to previous 1.69 (colored)

looks like some extra ')'s were left in here.

Revision 1.69 / (download) - annotate - [select for diffs], Wed May 3 19:39:05 1995 UTC (28 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.68: +24 -24 lines
Diff to previous 1.68 (colored)

Make the byte-shifting code consistent.

Revision 1.68 / (download) - annotate - [select for diffs], Sat Apr 15 05:01:29 1995 UTC (29 years ago) by mycroft
Branch: MAIN
Changes since 1.67: +3 -2 lines
Diff to previous 1.67 (colored)

Don't boundary check I/O to the `raw' partition.

Revision 1.67 / (download) - annotate - [select for diffs], Mon Apr 10 16:53:40 1995 UTC (29 years ago) by mycroft
Branch: MAIN
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored)

kernel_pmap --> pmap_kernel()

Revision 1.66 / (download) - annotate - [select for diffs], Sat Apr 1 10:29:48 1995 UTC (29 years ago) by mycroft
Branch: MAIN
Changes since 1.65: +5 -3 lines
Diff to previous 1.65 (colored)

Add a missing unlock.

Revision 1.65 / (download) - annotate - [select for diffs], Wed Mar 29 23:04:52 1995 UTC (29 years ago) by mycroft
Branch: MAIN
Changes since 1.64: +30 -35 lines
Diff to previous 1.64 (colored)

Revamp the locking mechanism slightly.

Revision 1.64 / (download) - annotate - [select for diffs], Sat Mar 25 19:45:22 1995 UTC (29 years ago) by mycroft
Branch: MAIN
Changes since 1.63: +1 -10 lines
Diff to previous 1.63 (colored)

Remove the write protect check altogether, and rely on the drive to do it.

Revision 1.63 / (download) - annotate - [select for diffs], Thu Mar 23 12:11:12 1995 UTC (29 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.62: +10 -10 lines
Diff to previous 1.62 (colored)

Check for read-only media in open(), not write().

Revision 1.62 / (download) - annotate - [select for diffs], Thu Mar 23 11:43:13 1995 UTC (29 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.61: +7 -4 lines
Diff to previous 1.61 (colored)

Rearrange DIOCWDINFO a little; closer to wd.c.

Revision 1.61 / (download) - annotate - [select for diffs], Thu Mar 23 11:33:25 1995 UTC (29 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.60: +63 -49 lines
Diff to previous 1.60 (colored)

Allow DIOCWDINFO even if label is not `writable'.

Revision 1.60 / (download) - annotate - [select for diffs], Tue Mar 7 21:46:11 1995 UTC (29 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.59: +8 -4 lines
Diff to previous 1.59 (colored)

Correct spelling of `fictitious'.  Add patterns for optical memory devices.
From Alistair Crooks.

Revision 1.59 / (download) - annotate - [select for diffs], Mon Jan 30 11:47:59 1995 UTC (29 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.58: +3 -3 lines
Diff to previous 1.58 (colored)

Some drives don't grok START with LoEj=1, either.

Revision 1.58 / (download) - annotate - [select for diffs], Mon Jan 30 11:37:23 1995 UTC (29 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.57: +3 -3 lines
Diff to previous 1.57 (colored)

Set the LoadEject bit when issuing a START.

Revision 1.57 / (download) - annotate - [select for diffs], Mon Jan 30 11:34:30 1995 UTC (29 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.56: +10 -8 lines
Diff to previous 1.56 (colored)

Some devices really do require the START before the PREVENT.  This makes no
sense.

Revision 1.56 / (download) - annotate - [select for diffs], Thu Jan 26 12:05:54 1995 UTC (29 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.55: +2 -2 lines
Diff to previous 1.55 (colored)

Update copyrights.

Revision 1.55 / (download) - annotate - [select for diffs], Thu Jan 26 11:56:57 1995 UTC (29 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.54: +15 -20 lines
Diff to previous 1.54 (colored)

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.54 / (download) - annotate - [select for diffs], Mon Jan 23 18:17:24 1995 UTC (29 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.53: +5 -4 lines
Diff to previous 1.53 (colored)

Do the PREVENT before the START.

Revision 1.53 / (download) - annotate - [select for diffs], Mon Jan 16 21:40:17 1995 UTC (29 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.52: +5 -2 lines
Diff to previous 1.52 (colored)

If the disk reports a block size of 0, assume it really meant 512.

Revision 1.52 / (download) - annotate - [select for diffs], Fri Jan 13 10:51:18 1995 UTC (29 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.51: +11 -35 lines
Diff to previous 1.51 (colored)

Always boundary check I/O.

Revision 1.51 / (download) - annotate - [select for diffs], Wed Dec 28 19:43:13 1994 UTC (29 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.50: +91 -94 lines
Diff to previous 1.50 (colored)

Numerous changes.  Many bugs fixed, better autoconfig, a few new features.

Revision 1.50 / (download) - annotate - [select for diffs], Fri Dec 16 04:38:36 1994 UTC (29 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.49: +1 -4 lines
Diff to previous 1.49 (colored)

Remove DIOCSBAD handling.  It's not actually handled, so why recognize it?

Revision 1.49 / (download) - annotate - [select for diffs], Wed Dec 14 15:20:15 1994 UTC (29 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.48: +1 -2 lines
Diff to previous 1.48 (colored)

Remove dkbad.h.

Revision 1.48 / (download) - annotate - [select for diffs], Wed Nov 23 07:55:31 1994 UTC (29 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.47: +8 -7 lines
Diff to previous 1.47 (colored)

There's no point in bothering to unlock what we didn't lock.

Revision 1.47 / (download) - annotate - [select for diffs], Tue Nov 22 03:23:55 1994 UTC (29 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.46: +33 -32 lines
Diff to previous 1.46 (colored)

Add still more locking.

Revision 1.46 / (download) - annotate - [select for diffs], Mon Nov 21 10:39:25 1994 UTC (29 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.45: +7 -11 lines
Diff to previous 1.45 (colored)

Replace dev_unit with device_softc in scsi_link.  Change argument to foostart()
to void*.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Nov 20 22:36:48 1994 UTC (29 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.44: +158 -136 lines
Diff to previous 1.44 (colored)

Add some missing locking, and some general cleanup.

Revision 1.44 / (download) - annotate - [select for diffs], Tue Nov 15 23:00:23 1994 UTC (29 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

Enough Chinese torture already

Revision 1.43 / (download) - annotate - [select for diffs], Sun Oct 30 21:49:26 1994 UTC (29 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.42: +3 -3 lines
Diff to previous 1.42 (colored)

be more careful with types, also pull in headers where necessary.

Revision 1.42 / (download) - annotate - [select for diffs], Thu Oct 20 20:31:31 1994 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

First cut at making user-level SCSI commands work.  This is untested.
Partly from John Brezak.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Oct 20 16:54:44 1994 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.40: +4 -9 lines
Diff to previous 1.40 (colored)

Back out change to print geometry from label at boot; can't do this reliably.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Oct 20 14:09:13 1994 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.39: +15 -15 lines
Diff to previous 1.39 (colored)

openpart -> openmask

Revision 1.39 / (download) - annotate - [select for diffs], Thu Oct 20 14:05:08 1994 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.38: +14 -14 lines
Diff to previous 1.38 (colored)

Trivial stylistic changes.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Oct 20 13:50:38 1994 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.37: +2 -3 lines
Diff to previous 1.37 (colored)

Use the block size in the label in most cases.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Oct 20 13:33:36 1994 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.36: +84 -76 lines
Diff to previous 1.36 (colored)

Various changes:
* Get rid of unused `partflags'.
* Use dk_openpart, and remove `openparts'.  Also, allow an open on both
the block and characters devices at the same time.
* If there was a label, print the geometry from the label at boot time.
* Turn `wlabel' into a flag, and *don't* set it automatically in
DIOCWLABEL; disklabel(8) does that.
Other minor changes.

Revision 1.36 / (download) - annotate - [select for diffs], Fri Oct 14 18:27:50 1994 UTC (29 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.35: +8 -11 lines
Diff to previous 1.35 (colored)

move arch dependence to archs.  clean up a bit.  deal with weird MAXPARTITONS.

Revision 1.34.2.1 / (download) - annotate - [select for diffs], Tue Jul 26 19:55:20 1994 UTC (29 years, 8 months ago) by cgd
Changes since 1.34: +8 -7 lines
Diff to previous 1.34 (colored) next main 1.35 (colored)

from branch.

Revision 1.35 / (download) - annotate - [select for diffs], Tue Jul 26 19:39:19 1994 UTC (29 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.34: +8 -7 lines
Diff to previous 1.34 (colored)

Normalize label handling.

Revision 1.34 / (download) - annotate - [select for diffs], Mon Jul 4 20:39:53 1994 UTC (29 years, 9 months ago) by chopps
Branch: MAIN
Changes since 1.33: +5 -4 lines
Diff to previous 1.33 (colored)

change to support other MAXPARTITIONS vals aside from 8

Revision 1.33 / (download) - annotate - [select for diffs], Wed Jun 29 06:43:14 1994 UTC (29 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.32 / (download) - annotate - [select for diffs], Thu Jun 16 15:57:44 1994 UTC (29 years, 10 months ago) by chopps
Branch: MAIN
Changes since 1.31: +6 -8 lines
Diff to previous 1.31 (colored)

resolve confusion over who owns the buf after calling scsi_scsi_cmd()

Revision 1.31 / (download) - annotate - [select for diffs], Thu Jun 16 01:11:47 1994 UTC (29 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

b_un.b_addr -> b_data

Revision 1.30 / (download) - annotate - [select for diffs], Mon May 9 07:40:53 1994 UTC (29 years, 11 months ago) by chopps
Branch: MAIN
Changes since 1.29: +4 -2 lines
Diff to previous 1.29 (colored)

remove union's from sense_data struct, conditionaly define RAW_PART

Revision 1.29 / (download) - annotate - [select for diffs], Mon Apr 11 03:54:10 1994 UTC (30 years ago) by mycroft
Branch: MAIN
Changes since 1.28: +8 -18 lines
Diff to previous 1.28 (colored)

Fix various types.  Remove some outdated flags.

Revision 1.28 / (download) - annotate - [select for diffs], Mon Apr 11 02:23:48 1994 UTC (30 years ago) by mycroft
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

Combine scsi_start_unit() and scsi_stop_unit(), and increase the start
timeout (again).

Revision 1.27 / (download) - annotate - [select for diffs], Wed Apr 6 00:43:57 1994 UTC (30 years ago) by mycroft
Branch: MAIN
Changes since 1.26: +8 -9 lines
Diff to previous 1.26 (colored)

Redo the last change; it was compltely bogus.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Apr 6 00:23:31 1994 UTC (30 years ago) by mycroft
Branch: MAIN
Changes since 1.25: +12 -4 lines
Diff to previous 1.25 (colored)

Try to detect garbage data from page 4 sense.

Revision 1.25 / (download) - annotate - [select for diffs], Tue Mar 29 04:29:40 1994 UTC (30 years ago) by mycroft
Branch: MAIN
Changes since 1.24: +669 -1042 lines
Diff to previous 1.24 (colored)

New SCSI system, based on Julian's more recent work.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Mar 24 17:47:35 1994 UTC (30 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.23: +26 -1 lines
Diff to previous 1.23 (colored)

print even more SCSI sense data; this should be in a function...

Revision 1.23 / (download) - annotate - [select for diffs], Thu Mar 24 04:32:44 1994 UTC (30 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.22: +23 -3 lines
Diff to previous 1.22 (colored)

print out lots of info on non-media hardware error...

Revision 1.18.2.12 / (download) - annotate - [select for diffs], Wed Feb 16 02:40:51 1994 UTC (30 years, 2 months ago) by mycroft
Changes since 1.18.2.11: +51 -57 lines
Diff to previous 1.18.2.11 (colored) next main 1.19 (colored)

More KNF-like.

Revision 1.18.2.11 / (download) - annotate - [select for diffs], Sun Feb 6 10:06:35 1994 UTC (30 years, 2 months ago) by mycroft
Changes since 1.18.2.10: +2 -2 lines
Diff to previous 1.18.2.10 (colored)

Use b_actf, not av_forw.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Feb 6 10:05:50 1994 UTC (30 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Use b_actf, not av_forw.

Revision 1.18.2.10 / (download) - annotate - [select for diffs], Tue Feb 1 20:05:24 1994 UTC (30 years, 2 months ago) by mycroft
Changes since 1.18.2.9: +7 -7 lines
Diff to previous 1.18.2.9 (colored)

Add scsi_stop_unit(), from Mac code.  Other minor nits.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Jan 25 08:56:45 1994 UTC (30 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.20: +9 -7 lines
Diff to previous 1.20 (colored)

print nice numbers for disks >2G. from <adrian@lemmings.cursci.com>

Revision 1.20 / (download) - annotate - [select for diffs], Tue Jan 11 17:22:02 1994 UTC (30 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

*strategy functions return void.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Dec 17 08:50:56 1993 UTC (30 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.18: +20 -19 lines
Diff to previous 1.18 (colored)

Canonicalize all #includes.

Revision 1.18.2.9 / (download) - annotate - [select for diffs], Mon Nov 29 06:14:10 1993 UTC (30 years, 4 months ago) by mycroft
Changes since 1.18.2.8: +8 -6 lines
Diff to previous 1.18.2.8 (colored)

Use dk_establish().

Revision 1.18.2.8 / (download) - annotate - [select for diffs], Thu Nov 25 10:31:56 1993 UTC (30 years, 4 months ago) by mycroft
Changes since 1.18.2.7: +2 -2 lines
Diff to previous 1.18.2.7 (colored)

Fix silly typo.

Revision 1.18.2.7 / (download) - annotate - [select for diffs], Thu Nov 25 10:01:34 1993 UTC (30 years, 4 months ago) by mycroft
Changes since 1.18.2.6: +130 -128 lines
Diff to previous 1.18.2.6 (colored)

(Hopefully) make cd work.  Make cd and sd more similar.  Implement variable
block sizes in sd.

Revision 1.18.2.6 / (download) - annotate - [select for diffs], Wed Nov 24 23:00:06 1993 UTC (30 years, 4 months ago) by mycroft
Changes since 1.18.2.5: +39 -43 lines
Diff to previous 1.18.2.5 (colored)

Final tweaks to get it going.

Revision 1.18.2.5 / (download) - annotate - [select for diffs], Wed Nov 24 20:24:26 1993 UTC (30 years, 4 months ago) by mycroft
Changes since 1.18.2.4: +4 -5 lines
Diff to previous 1.18.2.4 (colored)

Fix unitialized variable.

Revision 1.18.2.4 / (download) - annotate - [select for diffs], Wed Nov 24 19:19:49 1993 UTC (30 years, 4 months ago) by mycroft
Changes since 1.18.2.3: +88 -135 lines
Diff to previous 1.18.2.3 (colored)

More construction...

Revision 1.18.2.3 / (download) - annotate - [select for diffs], Wed Nov 24 09:45:14 1993 UTC (30 years, 4 months ago) by mycroft
Changes since 1.18.2.2: +79 -102 lines
Diff to previous 1.18.2.2 (colored)

Still under construction...

Revision 1.18.2.2 / (download) - annotate - [select for diffs], Wed Nov 24 05:03:10 1993 UTC (30 years, 4 months ago) by mycroft
Changes since 1.18.2.1: +679 -959 lines
Diff to previous 1.18.2.1 (colored)

Under construction...

Revision 1.18.2.1 / (download) - annotate - [select for diffs], Fri Sep 24 08:57:15 1993 UTC (30 years, 6 months ago) by mycroft
Changes since 1.18: +2 -2 lines
Diff to previous 1.18 (colored)

cd.c, sd.c, st.c: strategy functions return void.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Aug 1 19:26:21 1993 UTC (30 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored)

Add RCS identifiers (this time on the correct side of the branch), and
incorporate recent changes in netbsd-0-9 branch.

Revision 1.17.2.1 / (download) - annotate - [select for diffs], Sat Jul 31 12:28:22 1993 UTC (30 years, 8 months ago) by cgd
Changes since 1.17: +3 -3 lines
Diff to previous 1.17 (colored) next main 1.18 (colored)

give names, err, wmesg's, to my "pain" -- i.e. convert sleep() to tsleep()

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jul 19 11:30:52 1993 UTC (30 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

patches from allen briggs to fix a minor bug in *attach()

Revision 1.16 / (download) - annotate - [select for diffs], Sun Jul 4 07:09:59 1993 UTC (30 years, 9 months ago) by andrew
Branch: MAIN
Changes since 1.15: +8 -2 lines
Diff to previous 1.15 (colored)

Reject non block-aligned transfers (where a block is 512 bytes in length);
they were causing scsi controller lockups.  Replace an occurrence of "512"
with SECSIZE, which is #defined to be 512.

Revision 1.15 / (download) - annotate - [select for diffs], Sun Jun 27 06:59:20 1993 UTC (30 years, 9 months ago) by andrew
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

ANSIfications.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Jun 16 04:31:40 1993 UTC (30 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

whoops. typo.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Jun 16 03:39:40 1993 UTC (30 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +4 -1 lines
Diff to previous 1.12 (colored)

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.12 / (download) - annotate - [select for diffs], Tue May 25 07:27:37 1993 UTC (30 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.11: +21 -21 lines
Diff to previous 1.11 (colored)

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.11 / (download) - annotate - [select for diffs], Fri May 21 12:20:30 1993 UTC (30 years, 11 months ago) by davidb
Branch: MAIN
Changes since 1.10: +11 -9 lines
Diff to previous 1.10 (colored)

Changed when disks are started, to get DEC disks working.

Revision 1.10 / (download) - annotate - [select for diffs], Thu May 20 23:12:53 1993 UTC (30 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.9: +7 -6 lines
Diff to previous 1.9 (colored)

more disklabel changes

Revision 1.9 / (download) - annotate - [select for diffs], Thu May 20 03:46:42 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.8: +2 -0 lines
Diff to previous 1.8 (colored)

add rcsids and clean up file headers

Revision 1.8 / (download) - annotate - [select for diffs], Tue May 4 08:27:35 1993 UTC (30 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.7: +17 -12 lines
Diff to previous 1.7 (colored)

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.7 / (download) - annotate - [select for diffs], Mon Apr 26 18:45:49 1993 UTC (30 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (colored)

cosmetic change

Revision 1.6 / (download) - annotate - [select for diffs], Tue Apr 20 10:51:55 1993 UTC (31 years ago) by mycroft
Branch: MAIN
Changes since 1.5: +1 -1 lines
Diff to previous 1.5 (colored)

Display more meaningful message on SCSI `unit attention'.

Revision 1.5 / (download) - annotate - [select for diffs], Mon Apr 12 12:10:35 1993 UTC (31 years ago) by deraadt
Branch: MAIN
Changes since 1.4: +0 -1 lines
Diff to previous 1.4 (colored)

fixed various bugs like cdattach() returning garbage.

Revision 1.4 / (download) - annotate - [select for diffs], Mon Apr 12 10:15:21 1993 UTC (31 years ago) by deraadt
Branch: MAIN
Changes since 1.3: +7 -1 lines
Diff to previous 1.3 (colored)

small fixes

Revision 1.3 / (download) - annotate - [select for diffs], Mon Apr 12 08:19:38 1993 UTC (31 years ago) by deraadt
Branch: MAIN
Changes since 1.2: +869 -1029 lines
Diff to previous 1.2 (colored)

new scsi subsystem.
changes also in config/mkioconf.c
	i386/isa/wd.c, fd.c, and all scsi drivers.

Revision 1.2 / (download) - annotate - [select for diffs], Sat Apr 10 12:07:22 1993 UTC (31 years ago) by glass
Branch: MAIN
Changes since 1.1: +3 -4 lines
Diff to previous 1.1 (colored)

fixed to be compliant, subservient, and to take advantage of the newly
hacked config(8)

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 18:04:42 1993 UTC (31 years, 1 month ago) by cgd
Branch: MAIN

after 0.2.2 "stable" patches applied

This form allows you to request diff's 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.




CVSweb <webmaster@jp.NetBSD.org>