The NetBSD Project

CVS log for src/sys/dev/ata/wd.c

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.469.2.2: download - view: text, markup, annotated - select for diffs
Wed Nov 4 23:21:48 2026 UTC (11 days, 10 hours ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.469.2.1: preferred, colored; branchpoint 1.469: preferred, colored; next MAIN 1.470: preferred, colored
Changes since revision 1.469.2.1: +127 -39 lines
Sync with HEAD

Revision 1.476: download - view: text, markup, annotated - select for diffs
Sat Jul 4 00:13:39 2026 UTC (4 months, 1 week ago) by jakllsch
Branches: MAIN
CVS tags: perseant-exfatfs-base-20261102, HEAD
Diff to: previous 1.475: preferred, colored
Changes since revision 1.475: +3 -3 lines
avoid potentially unintialized 'error' variable

Revision 1.475: download - view: text, markup, annotated - select for diffs
Fri Jul 3 21:27:40 2026 UTC (4 months, 1 week ago) by thorpej
Branches: MAIN
Diff to: previous 1.474: preferred, colored
Changes since revision 1.474: +127 -39 lines
Re-factor BAD144 bad sector handling into its own source module.  This
lays the groundwork for removing many duplicate copies of BAD144 code
that have been cargo-culted over the decades.

Revision 1.469.2.1: download - view: text, markup, annotated - select for diffs
Sat Aug 2 05:56:35 2025 UTC (15 months, 2 weeks ago) by perseant
Branches: perseant-exfatfs
Diff to: previous 1.469: preferred, colored
Changes since revision 1.469: +24 -37 lines
Sync with HEAD

Revision 1.474: download - view: text, markup, annotated - select for diffs
Sun Apr 13 14:00:59 2025 UTC (19 months ago) by jakllsch
Branches: MAIN
CVS tags: perseant-exfatfs-base-20250801, netbsd-11-base, netbsd-11-1-RELEASE, netbsd-11-0-RELEASE, netbsd-11-0-RC7, netbsd-11-0-RC6, netbsd-11-0-RC5, netbsd-11-0-RC4, netbsd-11-0-RC3, netbsd-11-0-RC2, netbsd-11-0-RC1, netbsd-11
Diff to: previous 1.473: preferred, colored
Changes since revision 1.473: +20 -32 lines
Add physical sector and alignment info to struct disk_geom and the
geometry plist, and handle in partutil.

Bump version for disk_geom addition.

Collect DIOCGSECTORALIGN handling into one place.

Revision 1.473: download - view: text, markup, annotated - select for diffs
Thu Feb 27 01:34:43 2025 UTC (20 months, 2 weeks ago) by jakllsch
Branches: MAIN
Diff to: previous 1.472: preferred, colored
Changes since revision 1.472: +3 -2 lines
Ensure dsa_firstaligned returned from DIOCGSECTORALIGN is actually the first

Revision 1.472: download - view: text, markup, annotated - select for diffs
Sun Feb 23 02:07:35 2025 UTC (20 months, 3 weeks ago) by jakllsch
Branches: MAIN
Diff to: previous 1.471: preferred, colored
Changes since revision 1.471: +3 -5 lines
atap_logical_align is already what we want, we don't have to subtract it
from the logical blocks per physical block number.

Revision 1.471: download - view: text, markup, annotated - select for diffs
Mon Feb 17 18:45:01 2025 UTC (20 months, 4 weeks ago) by jakllsch
Branches: MAIN
Diff to: previous 1.470: preferred, colored
Changes since revision 1.470: +4 -4 lines
Fix aprint_error_dev() abuse

Revision 1.470: download - view: text, markup, annotated - select for diffs
Sun Sep 22 17:31:43 2024 UTC (2 years, 1 month ago) by uwe
Branches: MAIN
Diff to: previous 1.469: preferred, colored
Changes since revision 1.469: +3 -3 lines
wd.c: consistent whitespace within one #define group

Revision 1.469: download - view: text, markup, annotated - select for diffs
Mon Feb 5 21:46:06 2024 UTC (2 years, 9 months ago) by andvar
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base
Branch point for: perseant-exfatfs
Diff to: previous 1.468: preferred, colored
Changes since revision 1.468: +3 -3 lines
fix various typos in comments.

Revision 1.468: download - view: text, markup, annotated - select for diffs
Tue Jan 24 08:34:18 2023 UTC (3 years, 9 months ago) by mlelstv
Branches: MAIN
CVS tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Diff to: previous 1.467: preferred, colored
Changes since revision 1.467: +24 -4 lines
Sanitize capacity values.

Revision 1.452.2.3: download - view: text, markup, annotated - select for diffs
Fri Dec 30 14:39:10 2022 UTC (3 years, 10 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-5-RELEASE, netbsd-9-4-RELEASE
Diff to: previous 1.452.2.2: preferred, colored; branchpoint 1.452: preferred, colored; next MAIN 1.453: preferred, colored
Changes since revision 1.452.2.2: +36 -61 lines
Pull up following revision(s) (requested by tsutsui in ticket #1557):

	sys/dev/ic/ahcisata_core.c: revision 1.83
	sys/dev/ic/ahcisata_core.c: revision 1.102
	sys/dev/ata/ata.c: revision 1.164
	sys/dev/ata/ata_wdc.c: revision 1.115
	sys/dev/ata/ata_recovery.c: revision 1.4
	sys/dev/ic/siisata.c: revision 1.42
	sys/dev/ic/wdc.c: revision 1.308
	sys/dev/ic/mvsata.c: revision 1.56
	sys/dev/scsipi/atapi_wdc.c: revision 1.138
	sys/dev/ic/siisata.c: revision 1.49
	sys/dev/ata/atavar.h: revision 1.105
	sys/dev/ata/wd.c: revision 1.460
	sys/dev/ata/ata.c: revision 1.155
	sys/dev/ata/wd.c: revision 1.462
	sys/dev/ata/atavar.h: revision 1.109
	sys/dev/ata/satapmp_subr.c: revision 1.16
	sys/dev/ic/wdc.c: revision 1.299
	sys/dev/ic/ahcisata_core.c: revision 1.93
	sys/dev/ata/ata_wdc.c: revision 1.120
	sys/dev/ic/wdcvar.h: revision 1.100
	sys/dev/scsipi/atapi_wdc.c: revision 1.141
	sys/dev/ic/mvsata.c: revision 1.61
	sys/dev/usb/umass_isdata.c	(apply patch)

drop wd lock in wdstart1() before calling the ata_bio hook; when called
from ata thread context, that can still need to sleep for wdc attachments
in wdcwait()

fix use-after-free for ata xfer on bio submission found by KASAN
driver ata_bio hooks read parts of the xfer after ata_exec_xfer()
call in order to determine return value, change so that the hook
doesn't return any value - callers do not care already,
as all I/O requests are asynchronous

this problem was uncovered by recent change for wd(4) to not hold
wd mutex during ata_bio call, the interrupt for the xfer might
thus actually fire immediately

adjust also ata_exec_command driver hooks similarily - remove all
completion and waiting logic from drivers, upper layer ata code
using AT_WAIT/AT_POLL changed to call ata_wait_cmd() itself
PR kern/55169 by Nick Hudson

Function declaration formating whitespace consistency.  NFCI.

PR kern/56403
Fix kernel freeze for wdc(4) variants with ATAC_CAP_NOIRQ:

(1) Change ata_xfer_ops:c_poll from void to int function. When it returns
    ATAPOLL_AGAIN, let ata_xfer_start() iterate itself again.
(2) Let wdc_ata_bio_poll() return ATAPOLL_AGAIN until ATA_ITSDONE is
    achieved.

A similar change has been made for mvsata(4) (see mvsata_bio_poll()),
and no functional changes for other devices.

This is how the drivers worked before jdolecek-ncq branch was merged.
Note that this changes are less likely to cause infinite recursion:

(1) wdc_ata_bio_intr() called from wdc_ata_bio_poll() asserts ATA_ITSDONE
    in its error handling paths via wdc_ata_bio_done().
(2) Return value from c_start (= wdc_ata_bio_start()) is checked in
    ata_xfer_start().

Therefore, errors encountered in ata_xfer_ops:c_poll and c_start routines
terminate the recursion for wdc(4). The situation is similar for mvsata(4).

Still, there is a possibility where ata_xfer_start() takes long time to
finish a normal operation. This can result in a delayed response for lower
priority interrupts. But, I've never observed such a situation, even when
heavy thrashing takes place for swap partition in wd(4).
"Go ahead" by jdolecek@.

Revision 1.467: download - view: text, markup, annotated - select for diffs
Mon Mar 28 12:39:37 2022 UTC (4 years, 7 months ago) by riastradh
Branches: MAIN
CVS tags: netbsd-10-base, netbsd-10-2-RELEASE, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm
Diff to: previous 1.466: preferred, colored
Changes since revision 1.466: +6 -2 lines
wd(4): Use d_cfdriver/devtounit to avoid open/detach races.

Revision 1.466: download - view: text, markup, annotated - select for diffs
Tue Dec 28 13:27:32 2021 UTC (4 years, 10 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.465: preferred, colored
Changes since revision 1.465: +43 -8 lines
wd(4): Fix bugs in softbadsect handling.

- Don't copyout kernel virtual addresses (of SLIST entries) that
  userland won't use anyway.
  => The structure still has space for this pointer; it's just always
     null when userland gets it now.

- Don't copyout under a lock.

- Stop and return error if copyout fails (unless we've already copied
  some out).

- Don't kmem_free under a lock.

XXX Unclear whether anyone actually uses WD_SOFTBADSECT or why --
it's always been disabled by default.  Maybe we should just remove
it?

Revision 1.465: download - view: text, markup, annotated - select for diffs
Mon Sep 28 12:47:49 2020 UTC (6 years, 1 month ago) by jakllsch
Branches: MAIN
CVS tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.464: preferred, colored
Changes since revision 1.464: +3 -3 lines
fix typo that prevented bytes/physsect reporting from working

Revision 1.464: download - view: text, markup, annotated - select for diffs
Sun Sep 27 16:58:11 2020 UTC (6 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.463: preferred, colored
Changes since revision 1.463: +34 -75 lines
de-quadruplicate, remove unused argument

Revision 1.463: download - view: text, markup, annotated - select for diffs
Sun May 24 22:12:29 2020 UTC (6 years, 5 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.462: preferred, colored
Changes since revision 1.462: +13 -5 lines
account for already transferred data (partially done I/O) when
retrying an xfer, to avoid reading/writing data from/to wrong offset,
and eventually beyond the end of data buffer

fixes data corruption under QEMU observed by Paul Ripke for emulated
IDE drives

Revision 1.439.2.4: download - view: text, markup, annotated - select for diffs
Tue Apr 21 18:42:15 2020 UTC (6 years, 6 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.439.2.3: preferred, colored; branchpoint 1.439: preferred, colored; next MAIN 1.440: preferred, colored
Changes since revision 1.439.2.3: +30 -60 lines
Sync with HEAD

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

Revision 1.462: download - view: text, markup, annotated - select for diffs
Mon Apr 13 10:49:34 2020 UTC (6 years, 7 months ago) by jdolecek
Branches: MAIN
CVS tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Diff to: previous 1.461: preferred, colored
Changes since revision 1.461: +31 -61 lines
fix use-after-free for ata xfer on bio submission found by KASAN

driver ata_bio hooks read parts of the xfer after ata_exec_xfer()
call in order to determine return value, change so that the hook
doesn't return any value - callers do not care already,
as all I/O requests are asynchronous

this problem was uncovered by recent change for wd(4) to not hold
wd mutex during ata_bio call, the interrupt for the xfer might
thus actually fire immediately

adjust also ata_exec_command driver hooks similarily - remove all
completion and waiting logic from drivers, upper layer ata code
using AT_WAIT/AT_POLL changed to call ata_wait_cmd() itself

PR kern/55169 by Nick Hudson

Revision 1.461: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:05:02 2020 UTC (6 years, 7 months ago) by maxv
Branches: MAIN
Diff to: previous 1.460: preferred, colored
Changes since revision 1.460: +3 -3 lines
constify

Revision 1.439.2.3: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:04:18 2020 UTC (6 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.439.2.2: preferred, colored; branchpoint 1.439: preferred, colored
Changes since revision 1.439.2.2: +5 -0 lines
Mostly merge changes from HEAD upto 20200411

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

Revision 1.460: download - view: text, markup, annotated - select for diffs
Tue Apr 7 13:22:05 2020 UTC (6 years, 7 months ago) by jdolecek
Branches: MAIN
CVS tags: phil-wifi-20200411, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Diff to: previous 1.459: preferred, colored
Changes since revision 1.459: +7 -2 lines
drop wd lock in wdstart1() before calling the ata_bio hook; when called
from ata thread context, that can still need to sleep for wdc attachments
in wdcwait()

Revision 1.452.2.2: download - view: text, markup, annotated - select for diffs
Sat Mar 21 15:52:09 2020 UTC (6 years, 7 months ago) by martin
Branches: netbsd-9
CVS tags: netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Diff to: previous 1.452.2.1: preferred, colored; branchpoint 1.452: preferred, colored
Changes since revision 1.452.2.1: +3 -3 lines
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.452.2.1: download - view: text, markup, annotated - select for diffs
Sat Mar 21 15:18:57 2020 UTC (6 years, 7 months ago) by martin
Branches: netbsd-9
Diff to: previous 1.452: preferred, colored
Changes since revision 1.452: +48 -3 lines
Pull up following revision(s) (requested by riastradh in ticket #788):

	sys/sys/dkio.h: revision 1.26
	sys/dev/dkwedge/dk.c: revision 1.100
	sys/sys/disk.h: revision 1.75
	external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c: revision 1.14
	external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c: revision 1.15
	sys/dev/cgd.c: revision 1.121
	sys/dev/ata/wdvar.h: revision 1.50
	sys/kern/subr_disk_open.c: revision 1.15
	sys/dev/ata/wd.c: revision 1.459

New ioctl DIOCGSECTORALIGN returns sector alignment parameters.

struct disk_sectoralign {
        /* First aligned sector number.  */
        uint32_t dsa_firstaligned;
        /* Number of sectors per aligned unit.  */
        uint32_t dsa_alignment;
};

- Teach wd(4) to get it from ATA.
- Teach cgd(4) to pass it through from the underlying disk.
- Teach dk(4) to pass it through with adjustments.
- Teach zpool (zfs) to take advantage of it.
  => XXX zpool doesn't seem to understand when the vdev's starting
     sector is misaligned.

Missing:
- ccd(4) and raidframe(4) support -- these should support _using_
  DIOCGSECTORALIGN to decide where to start putting ccd or raid
  stripes on disk, and these should perhaps _implement_
  DIOCGSECTORALIGN by reporting the stripe/interleave factor.
- sd(4) support -- I don't know any obvious way to get it from SCSI,
  but if any SCSI wizards know better than I, please feel free to
  teach sd(4) about it!
- any ld(4) attachments -- might be worth teaching the ld drivers for
  nvme and various raid controllers to get the aligned sector size

There's some duplicate logic here for now.  I'm doing it this way,
rather than gathering the logic into a new disklabel_sectoralign
function or something, so that this change is limited to adding a new
ioctl, without any new kernel symbols, in order to make it easy to
pull up to netbsd-9 without worrying about the module ABI.

Make getdiskinfo() compatible with a DIOCGWEDGEINFO.

dkw_parent is defined to hold the disk name as used by disk_find(), not
a partition (i.e. no partition letter appended).

Use utility functions to handle disk geometry.

Revision 1.459: download - view: text, markup, annotated - select for diffs
Mon Mar 2 16:01:56 2020 UTC (6 years, 8 months ago) by riastradh
Branches: MAIN
CVS tags: phil-wifi-20200406, is-mlppp-base, is-mlppp
Diff to: previous 1.458: preferred, colored
Changes since revision 1.458: +48 -3 lines
New ioctl DIOCGSECTORALIGN returns sector alignment parameters.

struct disk_sectoralign {
	/* First aligned sector number.  */
	uint32_t dsa_firstaligned;

	/* Number of sectors per aligned unit.  */
	uint32_t dsa_alignment;
};

- Teach wd(4) to get it from ATA.
- Teach cgd(4) to pass it through from the underlying disk.
- Teach dk(4) to pass it through with adjustments.
- Teach zpool (zfs) to take advantage of it.
  => XXX zpool doesn't seem to understand when the vdev's starting
     sector is misaligned.

Missing:

- ccd(4) and raidframe(4) support -- these should support _using_
  DIOCGSECTORALIGN to decide where to start putting ccd or raid
  stripes on disk, and these should perhaps _implement_
  DIOCGSECTORALIGN by reporting the stripe/interleave factor.

- sd(4) support -- I don't know any obvious way to get it from SCSI,
  but if any SCSI wizards know better than I, please feel free to
  teach sd(4) about it!

- any ld(4) attachments -- might be worth teaching the ld drivers for
  nvme and various raid controllers to get the aligned sector size

There's some duplicate logic here for now.  I'm doing it this way,
rather than gathering the logic into a new disklabel_sectoralign
function or something, so that this change is limited to adding a new
ioctl, without any new kernel symbols, in order to make it easy to
pull up to netbsd-9 without worrying about the module ABI.

Revision 1.458: download - view: text, markup, annotated - select for diffs
Sun Mar 1 03:21:54 2020 UTC (6 years, 8 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.457: preferred, colored
Changes since revision 1.457: +3 -3 lines
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.453.2.2: download - view: text, markup, annotated - select for diffs
Sat Jan 25 22:38:45 2020 UTC (6 years, 9 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.453.2.1: preferred, colored; branchpoint 1.453: preferred, colored; next MAIN 1.454: preferred, colored
Changes since revision 1.453.2.1: +6 -11 lines
Sync with head.

Revision 1.457: download - view: text, markup, annotated - select for diffs
Sat Jan 18 11:24:40 2020 UTC (6 years, 9 months ago) by simonb
Branches: MAIN
CVS tags: ad-namecache-base3, ad-namecache-base2
Diff to: previous 1.456: preferred, colored
Changes since revision 1.456: +6 -9 lines
Tidy quirk table and remove outdated quick from the quirk format string.

Revision 1.456: download - view: text, markup, annotated - select for diffs
Sat Jan 18 11:22:49 2020 UTC (6 years, 9 months ago) by simonb
Branches: MAIN
Diff to: previous 1.455: preferred, colored
Changes since revision 1.455: +12 -14 lines
Revert kern/54790 and kern/54855 NCQ fix that penalised all Samsung
EVO 860 drives.

ok jdolecek@

Revision 1.453.2.1: download - view: text, markup, annotated - select for diffs
Fri Jan 17 21:47:30 2020 UTC (6 years, 10 months ago) by ad
Branches: ad-namecache
Diff to: previous 1.453: preferred, colored
Changes since revision 1.453: +14 -12 lines
Sync with head.

Revision 1.455: download - view: text, markup, annotated - select for diffs
Tue Jan 14 21:08:06 2020 UTC (6 years, 10 months ago) by jdolecek
Branches: MAIN
CVS tags: ad-namecache-base1
Diff to: previous 1.454: preferred, colored
Changes since revision 1.454: +3 -4 lines
enable the BAD_NCQ quirk for all 860 EVO drives

XXX work-in-progress, it's not clear whether this is driver or controller
XXX problem

Revision 1.454: download - view: text, markup, annotated - select for diffs
Mon Jan 13 21:20:17 2020 UTC (6 years, 10 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.453: preferred, colored
Changes since revision 1.453: +15 -12 lines
disable NCQ by default for "Samsung SSD 860 EVO 1TB" and
"Samsung SSD 860 EVO 500GB" - these drives have known broken NCQ support
particularly when used with AMD SB710/750 chipsets, problem occur also
under Linux and Windows

https://eu.community.samsung.com/t5/Cameras-IT-Everything-Else/860-EVO-250GB-causing-freezes-on-AMD-system/td-p/575813
https://bugzilla.kernel.org/show_bug.cgi?id=201693

It seems there is no Samsung firmware update to fix this even.

Disable NCQ regardless of the controller, it's likely same problem
exists with other controllers too.

This should fix PR kern/54790 and PR kern/54855

Revision 1.453: download - view: text, markup, annotated - select for diffs
Fri Dec 27 09:41:50 2019 UTC (6 years, 10 months ago) by msaitoh
Branches: MAIN
CVS tags: ad-namecache-base
Branch point for: ad-namecache
Diff to: previous 1.452: preferred, colored
Changes since revision 1.452: +3 -3 lines
s/transfered/transferred/

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

Revision 1.452: download - view: text, markup, annotated - select for diffs
Thu Jun 6 20:55:43 2019 UTC (7 years, 5 months ago) by mlelstv
Branches: MAIN
CVS tags: phil-wifi-20191119, phil-wifi-20190609, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1
Branch point for: netbsd-9
Diff to: previous 1.451: preferred, colored
Changes since revision 1.451: +5 -2 lines
Take channel lock for calling reset_drive.
Should fix PR 54217.

Revision 1.451: download - view: text, markup, annotated - select for diffs
Thu Jun 6 20:41:04 2019 UTC (7 years, 5 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.450: preferred, colored
Changes since revision 1.450: +6 -3 lines
Count only the initial start of a transfer, not the retries.
Should fix kern/54166.

Thanks to macallan@ for spotting the issue.

Revision 1.450: download - view: text, markup, annotated - select for diffs
Fri May 24 06:01:05 2019 UTC (7 years, 5 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.449: preferred, colored
Changes since revision 1.449: +25 -9 lines
Also schedule timeouts when all openings are in use.

Revision 1.449: download - view: text, markup, annotated - select for diffs
Sun Apr 7 13:00:00 2019 UTC (7 years, 7 months ago) by bouyer
Branches: MAIN
CVS tags: isaki-audio2-base, isaki-audio2
Diff to: previous 1.448: preferred, colored
Changes since revision 1.448: +10 -5 lines
Really implement WDF_DIRTY. patch(1) did something silly here ...

Revision 1.448: download - view: text, markup, annotated - select for diffs
Fri Apr 5 21:31:44 2019 UTC (7 years, 7 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.447: preferred, colored
Changes since revision 1.447: +3 -4 lines
drop AT_RST_NOCMD, it's a cut'n'paste side effect

Revision 1.447: download - view: text, markup, annotated - select for diffs
Fri Apr 5 18:23:45 2019 UTC (7 years, 7 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.446: preferred, colored
Changes since revision 1.446: +12 -2 lines
Implement a DIRTY flag (copied from sd(4)) so avoid flushing the cache if
there has been no write. This avoids a (long) timeout on the flush cache
command triggered by atactl sleep, when the device is open only by the atactl
command itself.
If a drive has no partition open and goes to sleep, the WDF_LOADED
flag is clear, and the next open will issue  wd_get_params() command.
But to wake up the drive a reset is required, and wd_get_params() doens't
issue a reset on timeout, so there's no way to wake up the disk.
Add a retry after reset to wd_get_params().

Tested by Hauke Fath; fixes PR kern/49457

Revision 1.446: download - view: text, markup, annotated - select for diffs
Tue Mar 19 16:56:29 2019 UTC (7 years, 8 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.445: preferred, colored
Changes since revision 1.445: +22 -3 lines
The NCQ support added a private request queue to the wd driver. This
makes the regular buffer queue ineffective, it also allowed to queue
an unlimited number of requests.

Fix this by limiting the number of requests queued to the driver to
the possible number of concurrent NCQ transactions.

Revision 1.445: download - view: text, markup, annotated - select for diffs
Tue Mar 19 06:51:05 2019 UTC (7 years, 8 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.444: preferred, colored
Changes since revision 1.444: +10 -5 lines
Set disk model name as disk type. The information can be queried through
drvctl(4).

Revision 1.444: download - view: text, markup, annotated - select for diffs
Tue Mar 19 06:47:12 2019 UTC (7 years, 8 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.443: preferred, colored
Changes since revision 1.443: +8 -5 lines
Move standby on detach after wedges deletion in case wedges trigger
I/O on the parent disk. Add debug messages.

Revision 1.438.2.3: download - view: text, markup, annotated - select for diffs
Mon Nov 26 01:52:30 2018 UTC (7 years, 11 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.438.2.2: preferred, colored; branchpoint 1.438: preferred, colored; next MAIN 1.439: preferred, colored
Changes since revision 1.438.2.2: +133 -122 lines
Sync with HEAD, resolve a couple of conflicts

Revision 1.443: download - view: text, markup, annotated - select for diffs
Wed Oct 24 19:46:44 2018 UTC (8 years ago) by jdolecek
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126
Diff to: previous 1.442: preferred, colored
Changes since revision 1.442: +13 -2 lines
move the comment (and expand) about NCQ TRIM to wd_trim()

Revision 1.442: download - view: text, markup, annotated - select for diffs
Mon Oct 22 20:13:47 2018 UTC (8 years ago) by jdolecek
Branches: MAIN
Diff to: previous 1.441: preferred, colored
Changes since revision 1.441: +122 -122 lines
Merge jdolecek-ncqfixes branch

- ata_xfer's are dynamicall allocated as needed using a pool, no longer
  limited to number of possible openings supported by controller; dump
  and recovery paths use dedicated pre-allocated storage
- moved callouts and condvars from ata_xfer to queue or channel, so that
  ata_xfer does not need special initialization
- slot allocation now done when xfer is being activated, uncoupled
  from memory allocation; active slots are no longer tracked by controller
  code
- channel and drive reset is done always via the atabus thread, and
  now executes with channel locked the whole time
- NCQ recovery moved to shared function, and run via the thread also
- added some workarounds for buggy error recovery AHCI emulation in QEMU
  and Parallels

designed to primarily fix kern/52614, but might also help with kern/47041
and kern/53183

Revision 1.441.2.12: download - view: text, markup, annotated - select for diffs
Sat Oct 6 21:19:55 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.441.2.11: preferred, colored; branchpoint 1.441: preferred, colored; next MAIN 1.442: preferred, colored
Changes since revision 1.441.2.11: +3 -6 lines
actually, just make dump use the same queue skip as recovery, and remove the
no longer necessary ata_queue_reset() call from wd(4)

also for PR kern/47041

Revision 1.441.2.11: download - view: text, markup, annotated - select for diffs
Sat Oct 6 20:27:36 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.441.2.10: preferred, colored; branchpoint 1.441: preferred, colored
Changes since revision 1.441.2.10: +8 -4 lines
remove AT_RST_EMERG, do the queue reset explicitly in wd(4)

this should explicitly fix PR kern/47041 with sync during heavy
disk activity, even thought it was actually already implicitly fixed by calling
ata_thread_run() for drive reset in previous commit already, since the
function already called ata_queue_reset()

drop now unused ch_reset_flags and drive_reset_flags

Revision 1.441.2.10: download - view: text, markup, annotated - select for diffs
Sat Oct 6 19:25:43 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.441.2.9: preferred, colored; branchpoint 1.441: preferred, colored
Changes since revision 1.441.2.9: +7 -4 lines
fix dump to also hold channel lock for the drive reset

Revision 1.441.2.9: download - view: text, markup, annotated - select for diffs
Thu Oct 4 19:42:01 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.441.2.8: preferred, colored; branchpoint 1.441: preferred, colored
Changes since revision 1.441.2.8: +15 -5 lines
relax the NOERROR + C_CHAOS, just rerun the xfer instead of panic, to handle
another variant of bad/missing AHCI error recovery, this time under Parallels

Revision 1.441.2.8: download - view: text, markup, annotated - select for diffs
Thu Oct 4 17:53:23 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.441.2.7: preferred, colored; branchpoint 1.441: preferred, colored
Changes since revision 1.441.2.7: +3 -3 lines
don't add +1 to retry on error

Revision 1.441.2.7: download - view: text, markup, annotated - select for diffs
Wed Oct 3 19:20:48 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.441.2.6: preferred, colored; branchpoint 1.441: preferred, colored
Changes since revision 1.441.2.6: +13 -8 lines
change channel reset and drive reset for all ATA controllers to always
run via thread, and with channel lock held the whole time; the queue is
frozen while reset is pending

for this repurpose ata_reset_channel() into new ata_thread_run()

also adjust some device printfs to not leak xfer pointer, and avoid
aprint_* for non-autoconf messages

Revision 1.441.2.6: download - view: text, markup, annotated - select for diffs
Sat Sep 22 17:50:09 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.441.2.5: preferred, colored; branchpoint 1.441: preferred, colored
Changes since revision 1.441.2.5: +19 -21 lines
remove explicit ata_channel_start() calls, it's no longer necessary
now that ata_xfer's are allocated via pool and not really limited;
replace by just a callout to restart the processing for rare cases
where system runs out of memory

Revision 1.441.2.5: download - view: text, markup, annotated - select for diffs
Sat Sep 22 16:14:25 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.441.2.4: preferred, colored; branchpoint 1.441: preferred, colored
Changes since revision 1.441.2.4: +6 -9 lines
fix use-after-free in wd(4) dump, detected by switch to the pool

change code in wd_dumpblocks() to use it's own non-pool ata_xfer,
which skips the deallocation step and thus keeps the contents when the I/O
is finished

Revision 1.441.2.4: download - view: text, markup, annotated - select for diffs
Sat Sep 22 09:22:59 2018 UTC (8 years, 1 month ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.441.2.3: preferred, colored; branchpoint 1.441: preferred, colored
Changes since revision 1.441.2.3: +9 -63 lines
separate ata_xfer slot allocation and the memory allocation, so that
there can be more queued xfers than number of supported slots by controller,
and use a pool instead of custom pre-allocation

primarily to help PR kern/52614

remove no longer needed custom wd(4) logic for flush cache

switch also wd(4) trim/suspend/setcache/wdioctlstrategy to sleep waiting
for the memory, they are all called from process context and this
avoids spurious failures

Revision 1.441.2.3: download - view: text, markup, annotated - select for diffs
Mon Sep 17 20:54:41 2018 UTC (8 years, 2 months ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.441.2.2: preferred, colored; branchpoint 1.441: preferred, colored
Changes since revision 1.441.2.2: +16 -12 lines
convert from malloc()/free() to kmem_zalloc()/kmem_free()

Revision 1.438.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 6 06:55:48 2018 UTC (8 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.438.2.1: preferred, colored; branchpoint 1.438: preferred, colored
Changes since revision 1.438.2.1: +41 -11 lines
Sync with HEAD

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

Revision 1.441.2.2: download - view: text, markup, annotated - select for diffs
Sat Sep 1 09:48:32 2018 UTC (8 years, 2 months ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.441.2.1: preferred, colored; branchpoint 1.441: preferred, colored
Changes since revision 1.441.2.1: +6 -6 lines
stop assuming c_slot is immutable, use the xfer pointer rather than c_slot
in printfs()

Revision 1.441.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 31 19:08:03 2018 UTC (8 years, 2 months ago) by jdolecek
Branches: jdolecek-ncqfixes
Diff to: previous 1.441: preferred, colored
Changes since revision 1.441: +51 -15 lines
refactor ata_xfer to be just dumb structure; move all callouts/condvars out

retry callout to wd(4); reset callout and the active/cmd finish condvars
to channel queue; change code using the condvars so it works if there
are multiple waiters

simplify the async wait code for cmds, replace ata_wait_xfer()/ata_wake_xfer()
with ata_wait_cmd()

fix the callout_invoking/ack race handling code for timeouts to
actually have chance to work; change mvsata(4) to use generic timeout func

towards resolution of kern/52614

Revision 1.441: download - view: text, markup, annotated - select for diffs
Fri Aug 10 22:43:22 2018 UTC (8 years, 3 months ago) by jdolecek
Branches: MAIN
CVS tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, jdolecek-ncqfixes-base
Branch point for: jdolecek-ncqfixes
Diff to: previous 1.440: preferred, colored
Changes since revision 1.440: +18 -11 lines
fix race in wd_lastclose() on systems with two ide disks on same
channel, which happened when one disk had pending I/O while the other
disk executed the final disk flush - need to restart bufq processing
once xfer is freed in this case

it could happen e.g. on boot when system executes fsck on different
partitions on the two drives in parallell and hence open and closes
the disk devices repeatedly

add KASSERT() for empty bufq on wd_lastclose(), and fix similar issue
also on suspend/standby path

this was introduced by the NCQ merge and not dksubr - before the merge
each drive had their own xfer, so they could not block each other

fixes PR kern/52783 by Onno van der Linden; many thanks for extensive
help with tracking this down

Revision 1.440: download - view: text, markup, annotated - select for diffs
Mon Aug 6 20:07:05 2018 UTC (8 years, 3 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.439: preferred, colored
Changes since revision 1.439: +25 -2 lines
add wddebug() which dumps some status for attached disks; indended for
debugging of PR kern/52783

Revision 1.438.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 25 07:25:49 2018 UTC (8 years, 4 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.438: preferred, colored
Changes since revision 1.438: +7 -2 lines
Sync with HEAD

Revision 1.439: download - view: text, markup, annotated - select for diffs
Sun Jun 3 18:38:35 2018 UTC (8 years, 5 months ago) by jdolecek
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-0728, pgoyette-compat-0625
Branch point for: phil-wifi
Diff to: previous 1.438: preferred, colored
Changes since revision 1.438: +7 -2 lines
take mutex around check for pending flush, as the code before dksubr
conversion had, to avoid possible race

on my system doesn't really change behaviour, besides the test runs
being slightly faster (3x parallell pkgsrc archive extraction, up
to 5% difference), thought that can just be noise

done as part of investigation for PR kern/53183 by Sevan Janiyan

Revision 1.438: download - view: text, markup, annotated - select for diffs
Sun Jan 7 11:37:30 2018 UTC (8 years, 10 months ago) by mlelstv
Branches: MAIN
CVS tags: pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.437: preferred, colored
Changes since revision 1.437: +13 -4 lines
Fix block address calculation for bad sectors.

Revision 1.437: download - view: text, markup, annotated - select for diffs
Wed Dec 13 10:24:31 2017 UTC (8 years, 11 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.436: preferred, colored
Changes since revision 1.436: +10 -8 lines
Fix build for WD_SOFTBADSECT option.  PR kern/52814

XXX No clue if this option actually works.  This fix just makes it
XXX compile without error.

Revision 1.400.2.6: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:36:59 2017 UTC (8 years, 11 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.400.2.5: preferred, colored; next MAIN 1.401: preferred, colored
Changes since revision 1.400.2.5: +891 -954 lines
update from HEAD

Revision 1.436: download - view: text, markup, annotated - select for diffs
Tue Nov 7 04:09:08 2017 UTC (9 years ago) by mlelstv
Branches: MAIN
CVS tags: tls-maxphys-base-20171202
Diff to: previous 1.435: preferred, colored
Changes since revision 1.435: +3 -3 lines
Make wddone poll all drives of a channel again.

Revision 1.435: download - view: text, markup, annotated - select for diffs
Fri Nov 3 13:01:26 2017 UTC (9 years ago) by mlelstv
Branches: MAIN
Diff to: previous 1.434: preferred, colored
Changes since revision 1.434: +41 -22 lines
Add WDF_OPEN flag to really disallow opening of a disk that has been invalidated.

Restore wdbiorestart function to actually retry the failed I/O request instead
of just restarting the queue.

Fix compilation without ATADEBUG.

Revision 1.434: download - view: text, markup, annotated - select for diffs
Wed Nov 1 19:34:46 2017 UTC (9 years ago) by mlelstv
Branches: MAIN
Diff to: previous 1.433: preferred, colored
Changes since revision 1.433: +331 -620 lines
refactor wd and ataraid drivers to use common disk subroutines.

Revision 1.433: download - view: text, markup, annotated - select for diffs
Thu Oct 19 20:45:07 2017 UTC (9 years ago) by jdolecek
Branches: MAIN
Diff to: previous 1.432: preferred, colored
Changes since revision 1.432: +12 -7 lines
more detailed debug info; also sync DEBUG_* values in wd.c with ata.c

Revision 1.432: download - view: text, markup, annotated - select for diffs
Sat Oct 14 13:20:32 2017 UTC (9 years, 1 month ago) by jdolecek
Branches: MAIN
Diff to: previous 1.431: preferred, colored
Changes since revision 1.431: +3 -3 lines
do not use the NCQ priority by default; seems it negatively affects
performance at least with some drives, so this needs better understood first

Revision 1.431: download - view: text, markup, annotated - select for diffs
Sat Oct 14 13:15:14 2017 UTC (9 years, 1 month ago) by jdolecek
Branches: MAIN
Diff to: previous 1.430: preferred, colored
Changes since revision 1.430: +6 -4 lines
only call drive reset with AT_POLL when the command itself was
polled, so that the logic for AT_POLL matches how e.g. ata_dmaerr() is
called; this was the original intent of the change in 1.428.2.25,
to make the error handling safe wrt. polled xfers

this is stopgap fix for ATA channel wedge after DMA error, as reported
by Martin Husemann in PR kern/52606, and PR kern/52605

problem happened due to ata_reset_channel() being called once in ata_dmaerr()
with flags == 0, which freezed channel and set flag to reset via thread,
then ata_reset_channel() was called via wdc_drive_reset() with AT_POLL, which
just executed the reset and cleared the flag, without clearing the extra
freeze; that logic will be refactored in separate commit

Revision 1.430: download - view: text, markup, annotated - select for diffs
Sat Oct 7 16:05:32 2017 UTC (9 years, 1 month ago) by jdolecek
Branches: MAIN
Diff to: previous 1.429: preferred, colored
Changes since revision 1.429: +565 -265 lines
Merge support for SATA NCQ (Native Command Queueing) from jdolecek-ncq branch

ATA subsystem was changed to support several outstanding commands, and use
NCQ xfers if supported by both the controller and the disk, including NCQ
error recovery. Set NCQ high priority for BPRIO_TIMECRITICAL xfers
if supported. Added FUA support.

Done some work towards MP-safe, all ATA code tsleep()/wakeup() replaced
by condvars, and switched most code from spl* to mutexes (separate
wd(4) and ata channel lock).

Introduced new option WD_CHAOS_MONKEY to facilitate testing of error
handling, fixed several uncovered issues. Also fixed several problems
with kernel dump to wd(4) disk.

Tested with ahcisata(4), mvsata(4), siisata(4), piixide(4) on amd64,
with and without port multiplier, both disk and ATAPI devices; other
drivers and archs mechanically adjusted and compile-tested. NCQ is
supported for ahcisata(4) and siisata(4) for any controller, for
mvsata(4) only Gen IIe ones for now. Also enabled ATAPI support in
mvsata(4).

Thanks to Matt Thomas for initial ATA infrastructure patch, and
Jonathan A.Kollasch for siisata(4) NCQ changes and general testing.

Also fixes PR kern/43169 (wd(4)); and PR kern/11811, PR kern/47041,
PR kern/51979 (kernel dump)

Revision 1.428.2.36: download - view: text, markup, annotated - select for diffs
Sat Oct 7 15:24:36 2017 UTC (9 years, 1 month ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.35: preferred, colored; branchpoint 1.428: preferred, colored; next MAIN 1.429: preferred, colored
Changes since revision 1.428.2.35: +16 -3 lines
make usage of NCQ 'high' priority for BPRIO_TIMECRITICAL xfers settable via
sysctl, too

Revision 1.428.2.35: download - view: text, markup, annotated - select for diffs
Thu Sep 28 20:34:23 2017 UTC (9 years, 1 month ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.34: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.34: +95 -14 lines
add sysctls to control if NCQ is being used, and how many max tags;
I have a drive which is significantly slower with NCQ than non-NCQ,
and it's generally useful to have this easily overridable

while here, also move the frequency settings for WD_CHAOS_MONKEY
to a sysctl and make it per-drive

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

Revision 1.428.2.34: download - view: text, markup, annotated - select for diffs
Sun Aug 13 15:12:04 2017 UTC (9 years, 3 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.33: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.33: +3 -3 lines
by default make the chaos monkey do nothing, so it's easier to have this
compiled in all the time for testing; the vars can be set via DDB
when needed

Revision 1.428.2.33: download - view: text, markup, annotated - select for diffs
Sun Aug 13 11:40:25 2017 UTC (9 years, 3 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.32: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.32: +17 -7 lines
restore the fallback to non-NCQ on retries, do this after WDIORETRIES_SINGLE
retries, but only for non-FUA I/O; also only do the ATA_SINGLE fallback
when non-FUA

this makes sure that bio with ATA_SINGLE is not attempted as NCQ -
the ATA_SINGLE I/O is usually done using PIO by drivers which
actually support it, and thus are not compatible with DMA-only NCQ

Revision 1.428.2.32: download - view: text, markup, annotated - select for diffs
Sat Aug 12 22:12:04 2017 UTC (9 years, 3 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.31: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.31: +4 -3 lines
do not reset drive after successful NCQ error recovery

Revision 1.428.2.31: download - view: text, markup, annotated - select for diffs
Sun Jul 30 20:16:29 2017 UTC (9 years, 3 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.30: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.30: +5 -11 lines
actually change the retry to also use NCQ - with one drive I see
very frequent fatal errors on siisata when switching often between
NCQ and non-NCQ I/O commands with chaos monkey (basically, always
the next NCQ command on a slot which had non-NCQ I/O throws fatal
error); they completely vanish when just using NCQ all the time

Revision 1.428.2.30: download - view: text, markup, annotated - select for diffs
Sat Jul 29 12:51:22 2017 UTC (9 years, 3 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.29: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.29: +9 -15 lines
actually count the REQUEUE as retry also, so that it will be retried
as non-NCQ, will not be subject to chaos monkey, and reported as fixed
once finished, too

Revision 1.428.2.29: download - view: text, markup, annotated - select for diffs
Sun Jul 23 13:50:43 2017 UTC (9 years, 3 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.28: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.28: +4 -3 lines
for wd, only call disk_busy() on the first try, do not call it on retries,
as unbusy is called just once when the xfer is finished

also noticed in PR kern/43169 by Matthias Pfaller, but contrary to suggested
fix done in way to keep the disk marked busy during the timeouts, as I think
it's more correct

Revision 1.428.2.28: download - view: text, markup, annotated - select for diffs
Fri Jul 21 17:32:27 2017 UTC (9 years, 3 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.27: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.27: +6 -2 lines
KASSERT() that chaosed xfer actually ends up with error; might end up being
returned as successful due to bugs in error recovery code

Revision 1.428.2.27: download - view: text, markup, annotated - select for diffs
Wed Jul 19 19:46:52 2017 UTC (9 years, 3 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.26: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.26: +3 -2 lines
defflag WD_CHAOS_MONKEY into opt_wd.h together with WD_SOFTBADSECT to set/unset
this more easily

Revision 1.428.2.26: download - view: text, markup, annotated - select for diffs
Wed Jul 19 19:39:28 2017 UTC (9 years, 3 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.25: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.25: +47 -48 lines
tighen and expand error handling, mostly for NCQ use cases:
- make retry timeout callout per xfer, i.e. retry separately
- zero whole bio struct on retry to avoid more stale state
- add a REQUEUE option, which doesn't bump retry count
- add ata_read_log_ext_ncq() for NCQ recovery
- adjust logic for activating xfers - allow next command only when
  it's for same drive, several concurrent are only supported when HBA
  and driver support FIS-based switching
- add new ata_timeout() which handles race between callout_stop()
  and the invokation, add appropriate handling on deactivate/free paths
- stop using ch_status/ch_error in non-wdc code; later it will be dropped
  completely

Revision 1.428.2.25: download - view: text, markup, annotated - select for diffs
Mon Jul 3 19:54:44 2017 UTC (9 years, 4 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.24: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.24: +23 -8 lines
reset xfer c_flags before retry, to clear flags like C_TIMEOU, or C_NCQ,
so that retry, and no-NCQ downgrade logic actually works - drivers
typically doesn't reset this field

print number of retries to make it easier to spot the same xfer being
retried several times

in wddone(), hold the wd lock only when reading/changing wd softc
structures, and not e.g. when calling malloc(), rnd_add_uint32() or
ata_free_xfer(), which have their own locks; initially done to fix
diagnostic assertion about held spin lock in kpause() within
ata_reset_drive hook, but need to run that hook with AT_POLL anyway,
since wddone() is typically invoked from interrupt context

fix another interrupt context bug for WD_SOFTBADSECT - the malloc() needs
to be called with M_NOWAIT

Revision 1.428.2.24: download - view: text, markup, annotated - select for diffs
Mon Jul 3 19:31:16 2017 UTC (9 years, 4 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.23: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.23: +20 -2 lines
introduce some code to test retry paths

Revision 1.428.2.23: download - view: text, markup, annotated - select for diffs
Sat Jun 24 00:00:10 2017 UTC (9 years, 4 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.22: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.22: +5 -4 lines
only limit the openings for I/O xfer if the drive actually supports NCQ; if
it's non-NCQ drive, the tag is not going to be used, so we can use any xfer

Revision 1.428.2.22: download - view: text, markup, annotated - select for diffs
Fri Jun 23 23:45:09 2017 UTC (9 years, 4 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.21: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.21: +5 -3 lines
add debug printf if we fail to obtain xfer in wddump()

Revision 1.428.2.21: download - view: text, markup, annotated - select for diffs
Fri Jun 23 22:11:13 2017 UTC (9 years, 4 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.20: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.20: +13 -11 lines
change wd_standby() to remove the ata_channel_start() call - the purpose
of that particular command is to make the drive idle

fix locking bug in wddetach() exposed by calling ata_channel_start()
in wd_standby() - move wd_standby() call out of the section protected
by drive mutex, to avoid lock against itself should it need to get
the lock

change wd_flushcache() to only call ata_channel_start() when called from
the ioctl; particularly, don't call it when suspending, closing, or on shutdown

Revision 1.428.2.20: download - view: text, markup, annotated - select for diffs
Fri Jun 23 20:40:51 2017 UTC (9 years, 4 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.19: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.19: +50 -16 lines
restart I/O processing after freeing xfer, i.e. now even after commands
like cache flush or standby; the command handling no longer use on-stack xfer,
hence use queue slot and compete with normal I/O for the xfers

the restart give change to all drives attached to the same channel
in round-robin fashion, for fair usage and to recover from situation
when disk is idle due to all xfers being consumed by other drives

make special concession for flush cache - ignore any new I/O requests
on the particular disk while the flush cache is waiting for xfer,
so that I/O queue won't starve the flush cache and the flush cache would
be done ASAP

tested on piixide(4), ahci(4), siisata(4)

Revision 1.428.2.19: download - view: text, markup, annotated - select for diffs
Tue Jun 20 20:58:22 2017 UTC (9 years, 4 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.18: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.18: +11 -9 lines
remove ata queue downsizing - every device, attached to the same channel,
uses slots according to it's own limits

wdc code changed to expect maximum one active xfer, and not check number
of openings in the channel; this is to facilitate using wdc functions
for e.g. handling of atapi commands  for drivers which support both ATAPI
and NCQ

Revision 1.428.2.18: download - view: text, markup, annotated - select for diffs
Mon Jun 19 21:00:00 2017 UTC (9 years, 4 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.17: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.17: +108 -92 lines
add ata_channel lock, use it to protect queue manipulation (only that for now);
add ata_channel_detach() to destroy the locks

change ata_get_xfer() so that it can wait for xfer, convert all on-stack
xfer code to use the blocking variant

fix siisata_reset_drive() to use polled reset and not try ata_activate_xfer(),
convert drive probe code also over from slot0 XXX to ata_get_xfer()

drive reset and PMP now works on siisata(4) too; changes tested also
on piixide(4), ahci(4), mvsata(4)

Revision 1.428.2.17: download - view: text, markup, annotated - select for diffs
Mon Jun 19 17:11:24 2017 UTC (9 years, 4 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.16: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.16: +5 -5 lines
ata subsystem needs more work before wd(4) could be MPSAFE

Revision 1.428.2.16: download - view: text, markup, annotated - select for diffs
Fri Jun 16 20:40:49 2017 UTC (9 years, 5 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.15: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.15: +12 -9 lines
adjust reset channel and dump paths
- channel reset now always kills active transfer, even on dump path, but
  now doesn't touch the queued waiting transfers; also kill_xfer hook is
  always called, so that HBA can free any private xfer resources and thus
  the dump request has chance to work
- kill_xfer routines now always call ata_deactivate_xfer(); added KASSERT()s
  to ata_free_xfer() to expect deactivated xfer
- when called during channel reset before dump, ata_kill_active() drops
  any queued waiting transfers without processing
- do not (re)queue any transfers in wddone() when dumping
- kill AT_RST_NOCMD flag

This should also hopefully fix the 'polled command has been queued' panic
as reported in:
PR kern/11811 by John Hawkinson
PR kern/47041 by Taylor R Campbell
PR kern/51979 by Martin Husemann

dump tested working with piixide(4) and ahci(4). mvsata(4) dump times out,
but otherwise tested working, will be fixed separately. siisata(4) mechanically
changed and not tested.

Revision 1.428.2.15: download - view: text, markup, annotated - select for diffs
Wed Jun 14 20:17:46 2017 UTC (9 years, 5 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.14: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.14: +14 -4 lines
put back reset of retry count to 0 when starting processing a buf

do not use NCQ for retried transfers to speed up recovery, unless FUA
is requested

Revision 1.429.2.1: download - view: text, markup, annotated - select for diffs
Sun Apr 30 10:27:16 2017 UTC (9 years, 6 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.429: preferred, colored; next MAIN 1.430: preferred, colored
Changes since revision 1.429: +4 -2 lines
And a few more DEVSW_MODULE_INIT for modular drivers

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

Revision 1.428.2.14: download - view: text, markup, annotated - select for diffs
Mon Apr 24 22:20:23 2017 UTC (9 years, 6 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.13: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.13: +6 -2 lines
set NCQ priority field to 'high' for BPRIO_TIMECRITICAL transfers if drive
supports it

Revision 1.428.2.13: download - view: text, markup, annotated - select for diffs
Mon Apr 24 14:07:29 2017 UTC (9 years, 6 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.12: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.12: +3 -3 lines
ata_free_xfer() must be called with lock held, same as ata_get_xfer()

Revision 1.428.2.12: download - view: text, markup, annotated - select for diffs
Mon Apr 24 09:57:22 2017 UTC (9 years, 6 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.11: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.11: +9 -132 lines
sync with HEAD, remove the nonfunctional Seagate 'mod15write' bug workaround

Revision 1.429: download - view: text, markup, annotated - select for diffs
Mon Apr 24 09:42:52 2017 UTC (9 years, 6 months ago) by jdolecek
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-20170426, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: prg-localcount2
Diff to: previous 1.428: preferred, colored
Changes since revision 1.428: +8 -109 lines
remove the workaround for Seagate 'mod15write' bug, now driver only prints
error on boog; unfortunately the code actually doesn't work, and there is
little point trying to fix

Revision 1.428.2.11: download - view: text, markup, annotated - select for diffs
Sun Apr 23 01:21:04 2017 UTC (9 years, 6 months ago) by jakllsch
Branches: jdolecek-ncq
Diff to: previous 1.428.2.10: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.10: +4 -25 lines
Simplify wi_find() with container_of().

No need to search a list of wd_ioctls when the *bp is always going to be within the wd_ioctl structure.

Correctly initialize wi->wi_bp.b_dev in the non-data case anyway.

Fixes ATAIOCCOMMAND procesing on driver instances other than wd0.

Revision 1.428.2.10: download - view: text, markup, annotated - select for diffs
Sat Apr 22 20:07:54 2017 UTC (9 years, 6 months ago) by jakllsch
Branches: jdolecek-ncq
Diff to: previous 1.428.2.9: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.9: +4 -3 lines
Avoid destroying uninitialized xfer on error in wdioctlstrategy().

Revision 1.427.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:53:45 2017 UTC (9 years, 6 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.427: preferred, colored; next MAIN 1.428: preferred, colored
Changes since revision 1.427: +3 -2 lines
Sync with HEAD

Revision 1.428.2.9: download - view: text, markup, annotated - select for diffs
Wed Apr 19 21:42:39 2017 UTC (9 years, 6 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.8: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.8: +14 -3 lines
add ATA FUA support

Revision 1.428.2.8: download - view: text, markup, annotated - select for diffs
Wed Apr 19 21:02:43 2017 UTC (9 years, 6 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.7: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.7: +19 -7 lines
up to 65536 sectors can be transferred for LBA48 commands; adjust wdminphys()
and wdstart1() accordingly

Revision 1.428.2.7: download - view: text, markup, annotated - select for diffs
Wed Apr 19 20:49:17 2017 UTC (9 years, 6 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.6: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.6: +73 -58 lines
adjust ata code to support more than one active command, including the
timeout handling, add support for NCQ commands

move probe for NCQ and number of tags to middle layer, negotiate mutual
support between drive and controller

implement NCQ support in ahci(4)

Revision 1.428.2.6: download - view: text, markup, annotated - select for diffs
Sat Apr 15 20:22:41 2017 UTC (9 years, 7 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.5: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.5: +3 -3 lines
tweak english

Revision 1.428.2.5: download - view: text, markup, annotated - select for diffs
Sat Apr 15 18:02:09 2017 UTC (9 years, 7 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.4: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.4: +29 -2 lines
probe for NCQ and WRITE DMA FUA EXT support

Revision 1.428.2.4: download - view: text, markup, annotated - select for diffs
Sat Apr 15 17:14:11 2017 UTC (9 years, 7 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.3: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.3: +91 -84 lines
pass also ata_command via ata_xfer, callers of ata_exec_command() is now
responsible for allocation/disposal of the structure

change code to allocate ata_xfer for commands on stack same way as previously
the ata_command were, using c_slot 0; adjust asserts so that it would allow
several xfers with same c_slot, as long as only one such transfer is active
at a time

Revision 1.428.2.3: download - view: text, markup, annotated - select for diffs
Sat Apr 15 12:01:23 2017 UTC (9 years, 7 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.2: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.2: +160 -103 lines
make ata_xfer's allocated as part of ata_queue and make it include ata_bio;
they are pre-allocated on attach and ata_get_xfer() now never sleep, drop the
pool

modify wd(4) to file the bio requests using the xfers and hence
make it possible to have more than one active I/O request in flight;
ata_bio callback doesn't need to allocate any memory any more,
require it to never return ATACMD_TRY_AGAIN

move lp, badsect, multi from ata_bio to ata_drive_datas, as they are per-drive,
not per transfer

drop unused drv atac_claim_hw/atac_free_hw hooks, and also drop again ata_bio
c_hwslot

Revision 1.428.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 12 22:28:20 2017 UTC (9 years, 7 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428.2.1: preferred, colored; branchpoint 1.428: preferred, colored
Changes since revision 1.428.2.1: +13 -7 lines
more MP

Revision 1.428.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 12 21:59:14 2017 UTC (9 years, 7 months ago) by jdolecek
Branches: jdolecek-ncq
Diff to: previous 1.428: preferred, colored
Changes since revision 1.428: +56 -54 lines
convert to mutex, mark MPSAFE

Revision 1.421.2.4: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:27 2017 UTC (9 years, 7 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.421.2.3: preferred, colored; branchpoint 1.421: preferred, colored
Changes since revision 1.421.2.3: +3 -2 lines
Sync with HEAD

Revision 1.428: download - view: text, markup, annotated - select for diffs
Sun Mar 5 23:07:12 2017 UTC (9 years, 8 months ago) by mlelstv
Branches: MAIN
CVS tags: pgoyette-localcount-20170320, jdolecek-ncq-base, bouyer-socketcan-base1
Branch point for: jdolecek-ncq
Diff to: previous 1.427: preferred, colored
Changes since revision 1.427: +3 -2 lines
Enhance disk metrics by calculating a weighted sum that is incremented
by the number of concurrent I/O requests. Also introduce a new disk_wait()
function to measure requests waiting in a bufq.
iostat -y now reports data about waiting and active requests.

So far only drivers using dksubr and dk, ccd, wd and xbd collect data about
waiting requests.

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

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

Revision 1.427: download - view: text, markup, annotated - select for diffs
Sun Nov 20 02:35:19 2016 UTC (9 years, 11 months ago) by pgoyette
Branches: MAIN
CVS tags: pgoyette-localcount-20170107, nick-nhusb-base-20170204, nick-nhusb-base-20161204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.426: preferred, colored
Changes since revision 1.426: +3 -3 lines
Avoid calling bufq_free() from critical section.

Revision 1.415.2.4: download - view: text, markup, annotated - select for diffs
Wed Oct 5 20:55:40 2016 UTC (10 years, 1 month ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.415.2.3: preferred, colored; branchpoint 1.415: preferred, colored
Changes since revision 1.415.2.3: +64 -21 lines
Sync with HEAD

Revision 1.421.2.2: download - view: text, markup, annotated - select for diffs
Sat Aug 6 00:19:07 2016 UTC (10 years, 3 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.421.2.1: preferred, colored; branchpoint 1.421: preferred, colored
Changes since revision 1.421.2.1: +4 -4 lines
Sync with HEAD

Revision 1.426: download - view: text, markup, annotated - select for diffs
Fri Aug 5 06:54:22 2016 UTC (10 years, 3 months ago) by christos
Branches: MAIN
CVS tags: pgoyette-localcount-20161104, pgoyette-localcount-20160806, nick-nhusb-base-20161004, localcount-20160914
Diff to: previous 1.425: preferred, colored
Changes since revision 1.425: +4 -4 lines
CID 1364758:  Integer handling issues, avoid sign extension to 64 bits.

Revision 1.421.2.1: download - view: text, markup, annotated - select for diffs
Tue Jul 26 03:24:21 2016 UTC (10 years, 3 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.421: preferred, colored
Changes since revision 1.421: +68 -25 lines
Sync with HEAD

Revision 1.425: download - view: text, markup, annotated - select for diffs
Fri Jul 22 12:55:34 2016 UTC (10 years, 3 months ago) by jakllsch
Branches: MAIN
CVS tags: pgoyette-localcount-20160726
Diff to: previous 1.424: preferred, colored
Changes since revision 1.424: +7 -7 lines
Space before tab and trailing whitespace fixes.

Revision 1.424: download - view: text, markup, annotated - select for diffs
Fri Jul 22 04:08:10 2016 UTC (10 years, 3 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.423: preferred, colored
Changes since revision 1.423: +60 -18 lines
Add ATA8-ACS Long Logical Sector Feature Set support to wd(4).

Revision 1.423: download - view: text, markup, annotated - select for diffs
Thu Jul 21 19:05:03 2016 UTC (10 years, 3 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.422: preferred, colored
Changes since revision 1.422: +4 -3 lines
Call wd_params_to_properties() after softc is sufficently
initialized.

Revision 1.422: download - view: text, markup, annotated - select for diffs
Thu Jul 21 18:54:13 2016 UTC (10 years, 3 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.421: preferred, colored
Changes since revision 1.421: +4 -4 lines
Remove unused 'params' argument of local function wd_params_to_properties()

Revision 1.415.2.3: download - view: text, markup, annotated - select for diffs
Sat Jul 9 20:25:01 2016 UTC (10 years, 4 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.415.2.2: preferred, colored; branchpoint 1.415: preferred, colored
Changes since revision 1.415.2.2: +4 -2 lines
Sync with HEAD

Revision 1.412.2.2: download - view: text, markup, annotated - select for diffs
Tue Jul 5 19:09:17 2016 UTC (10 years, 4 months ago) by snj
Branches: 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
Diff to: previous 1.412.2.1: preferred, colored; branchpoint 1.412: preferred, colored; next MAIN 1.413: preferred, colored
Changes since revision 1.412.2.1: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #1186):
	sys/dev/ata/wd.c: revision 1.421
	sys/kern/subr_autoconf.c: revision 1.242 via patch
	sys/sys/device.h: revision 1.149
Add a new config_detach() flag, DETACH_POWEROFF, which is set when
detaching devices at shutdown time with RB_POWERDOWN.
When detaching wd(4), put the drive in standby before detach
for DETACH_POWEROFF.
Fix PR kern/51252

Revision 1.421: download - view: text, markup, annotated - select for diffs
Sun Jun 19 09:35:06 2016 UTC (10 years, 4 months ago) by bouyer
Branches: MAIN
CVS tags: pgoyette-localcount-base, nick-nhusb-base-20160907
Branch point for: pgoyette-localcount
Diff to: previous 1.420: preferred, colored
Changes since revision 1.420: +4 -2 lines
Add a new config_detach() flag, DETACH_POWEROFF, which is set when
detaching devices at shutdown time with RB_POWERDOWN.
When detaching wd(4), put the drive in standby before detach
for DETACH_POWEROFF.
Fix PR kern/51252

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

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

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

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

Revision 1.418: download - view: text, markup, annotated - select for diffs
Fri Jan 2 19:42:06 2015 UTC (11 years, 10 months ago) by christos
Branches: MAIN
CVS tags: nick-nhusb-base-20150406
Diff to: previous 1.417: preferred, colored
Changes since revision 1.417: +4 -4 lines
We have three sets of DTYPE_ constants in the kernel:
	altq		Drop 		Type
	disklabel	Disk 		Type
	file		Descriptor	Type
(not to mention constants that contain the string DTYPE).
Let's make them two, by changing the disklabel one to be DisK TYPE since the
other disklabel constants seem to do that. Not many userland programs use
these constants (and the ones that they do are mostly in ifdefs). They will
be fixed shortly.

Revision 1.417: download - view: text, markup, annotated - select for diffs
Wed Dec 31 19:52:05 2014 UTC (11 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.416: preferred, colored
Changes since revision 1.416: +4 -26 lines
make more drivers use disk_ioctl, and add a dev parameter to it so that
we can merge the "easy" disklabel ioctls to it. Ultimately all this will
go do dk_ioctl once all the drivers have been converted.

Revision 1.416: download - view: text, markup, annotated - select for diffs
Wed Dec 31 17:06:48 2014 UTC (11 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.415: preferred, colored
Changes since revision 1.415: +2 -42 lines
Centralize wedge ioctls in disk_ioctl.

Revision 1.412.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 11 10:36:41 2014 UTC (12 years ago) by martin
Branches: netbsd-7
CVS tags: 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
Diff to: previous 1.412: preferred, colored
Changes since revision 1.412: +11 -2 lines
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.415: download - view: text, markup, annotated - select for diffs
Tue Nov 4 07:51:55 2014 UTC (12 years ago) by mlelstv
Branches: MAIN
CVS tags: nick-nhusb-base
Branch point for: nick-nhusb
Diff to: previous 1.414: preferred, colored
Changes since revision 1.414: +11 -2 lines
support DIOCMWEDGES ioctl.

Revision 1.414: download - view: text, markup, annotated - select for diffs
Sat Oct 11 14:05:11 2014 UTC (12 years, 1 month ago) by mlelstv
Branches: MAIN
Diff to: previous 1.413: preferred, colored
Changes since revision 1.413: +3 -4 lines
The partition size is always computed in native blocks. The code also assumes
that native blocks are always DEVB_SIZE (a few lines earlier) which makes
the current calculation a no-op.

Revision 1.413: download - view: text, markup, annotated - select for diffs
Wed Sep 10 07:04:48 2014 UTC (12 years, 2 months ago) by matt
Branches: MAIN
Diff to: previous 1.412: preferred, colored
Changes since revision 1.412: +9 -9 lines
g/u_int[0-9]*_t/ s/u_int/uint/g

Revision 1.400.2.5: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:03:35 2014 UTC (12 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.400.2.4: preferred, colored
Changes since revision 1.400.2.4: +75 -24 lines
Rebase to HEAD as of a few days ago.

Revision 1.412: download - view: text, markup, annotated - select for diffs
Sun Aug 10 16:44:35 2014 UTC (12 years, 3 months ago) by tls
Branches: MAIN
CVS tags: tls-maxphys-base, netbsd-7-base
Branch point for: netbsd-7
Diff to: previous 1.411: preferred, colored
Changes since revision 1.411: +3 -3 lines
Merge tls-earlyentropy branch into HEAD.

Revision 1.407.2.2: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:54:50 2014 UTC (12 years, 3 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.407.2.1: preferred, colored; branchpoint 1.407: preferred, colored; next MAIN 1.408: preferred, colored
Changes since revision 1.407.2.1: +50 -21 lines
Rebase.

Revision 1.411: download - view: text, markup, annotated - select for diffs
Fri Jul 25 08:34:27 2014 UTC (12 years, 3 months ago) by dholland
Branches: MAIN
CVS tags: tls-earlyentropy-base
Diff to: previous 1.410: preferred, colored
Changes since revision 1.410: +2 -20 lines
Drop the old discard/trim ioctls from wd.c.

Revision 1.410: download - view: text, markup, annotated - select for diffs
Fri Jul 25 08:22:08 2014 UTC (12 years, 3 months ago) by dholland
Branches: MAIN
Diff to: previous 1.409: preferred, colored
Changes since revision 1.409: +56 -11 lines
Implement d_discard for wd.

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

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

Revision 1.408: download - view: text, markup, annotated - select for diffs
Fri Jul 25 08:02:19 2014 UTC (12 years, 3 months ago) by dholland
Branches: MAIN
Diff to: previous 1.407: preferred, colored
Changes since revision 1.407: +3 -2 lines
Add d_discard to all struct bdevsw instances I could find.

I've set them all to nodiscard. Some of them (wd, dk, vnd, ld,
raidframe, maybe cgd) should be implemented for real.

Revision 1.389.2.4: download - view: text, markup, annotated - select for diffs
Thu May 22 11:40:20 2014 UTC (12 years, 5 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.389.2.3: preferred, colored; branchpoint 1.389: preferred, colored; next MAIN 1.390: preferred, colored
Changes since revision 1.389.2.3: +43 -55 lines
sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.403.2.2: download - view: text, markup, annotated - select for diffs
Sun May 18 17:45:35 2014 UTC (12 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.403.2.1: preferred, colored; branchpoint 1.403: preferred, colored; next MAIN 1.404: preferred, colored
Changes since revision 1.403.2.1: +26 -5 lines
sync with head

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

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
   RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

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

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

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

Revision 1.407: download - view: text, markup, annotated - select for diffs
Sun Mar 16 05:20:27 2014 UTC (12 years, 8 months ago) by dholland
Branches: 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
Diff to: previous 1.406: preferred, colored
Changes since revision 1.406: +20 -5 lines
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.

Revision 1.406: download - view: text, markup, annotated - select for diffs
Wed Oct 30 15:41:14 2013 UTC (13 years ago) by drochner
Branches: MAIN
Diff to: previous 1.405: preferred, colored
Changes since revision 1.405: +8 -2 lines
play the addref/delref game on suspend, prevents crash if the disk/CF Card
is eg. in a PCMCIA adapter and not mounted

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

Revision 1.405: download - view: text, markup, annotated - select for diffs
Mon Aug 19 14:58:57 2013 UTC (13 years, 3 months ago) by skrll
Branches: MAIN
Diff to: previous 1.404: preferred, colored
Changes since revision 1.404: +4 -3 lines
Don't return EPASSTHROUGH when succeeding in ODIOCGDINFO or ODIOCGDEFLABEL

Revision 1.404: download - view: text, markup, annotated - select for diffs
Tue Aug 6 19:13:13 2013 UTC (13 years, 3 months ago) by soren
Branches: MAIN
Diff to: previous 1.403: preferred, colored
Changes since revision 1.403: +4 -4 lines
TRIM showed up sometime between ATA-7 and ATA-8.

Revision 1.400.2.4: download - view: text, markup, annotated - select for diffs
Sun Jun 23 06:20:16 2013 UTC (13 years, 4 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.400.2.3: preferred, colored
Changes since revision 1.400.2.3: +15 -49 lines
resync from head

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

Revision 1.400.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 25 00:29:12 2013 UTC (13 years, 8 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.400.2.2: preferred, colored
Changes since revision 1.400.2.2: +3 -2 lines
resync with head

Revision 1.389.2.3: download - view: text, markup, annotated - select for diffs
Wed Jan 23 00:06:04 2013 UTC (13 years, 9 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.389.2.2: preferred, colored; branchpoint 1.389: preferred, colored
Changes since revision 1.389.2.2: +3 -2 lines
sync with head

Revision 1.402: download - view: text, markup, annotated - select for diffs
Wed Jan 9 22:03:49 2013 UTC (13 years, 10 months ago) by riastradh
Branches: MAIN
CVS tags: yamt-pagecache-base8, khorben-n900, agc-symver-base, agc-symver
Diff to: previous 1.401: preferred, colored
Changes since revision 1.401: +3 -2 lines
Initialize b_resid before biodone in wdioctlstrategy error branch.

Otherwise we may panic when physio's biodone callback kasserts
something about b_resid, since nothing will have initialized it.

Revision 1.400.2.2: download - view: text, markup, annotated - select for diffs
Tue Nov 20 03:01:59 2012 UTC (13 years, 11 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.400.2.1: preferred, colored
Changes since revision 1.400.2.1: +68 -2 lines
Resync to 2012-11-19 00:00:00 UTC

Revision 1.389.2.2: download - view: text, markup, annotated - select for diffs
Tue Oct 30 17:20:53 2012 UTC (14 years ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.389.2.1: preferred, colored; branchpoint 1.389: preferred, colored
Changes since revision 1.389.2.1: +105 -18 lines
sync with head

Revision 1.401: download - view: text, markup, annotated - select for diffs
Fri Oct 19 17:09:07 2012 UTC (14 years, 1 month ago) by drochner
Branches: MAIN
CVS tags: yamt-pagecache-base7, yamt-pagecache-base6
Diff to: previous 1.400: preferred, colored
Changes since revision 1.400: +68 -2 lines
Implement experimental support to pass notifications that a file
was deleted from the filesystem to the disk driver, commonly
known as "discard" or "trim".
fs/driver support is in ffs and ata wd for now.
This is what was posted here:
http://mail-index.netbsd.org/tech-kern/2012/02/28/msg012813.html
with minor cleanup, and the global switch replaced by a mount option.

Revision 1.400.2.1: download - view: text, markup, annotated - select for diffs
Tue Oct 9 13:36:04 2012 UTC (14 years, 1 month ago) by bouyer
Branches: tls-maxphys
Diff to: previous 1.400: preferred, colored
Changes since revision 1.400: +20 -10 lines
Support transfers of up to MACHINE_MAXPHYS in all pciide variants, and ahci.
wd(4) limits its maxphys depending on the drives's capability (64k sectors
for LBA48, 256 sectors for LBA and 128 sectors for older devices).

I assumed all pciide controllers could do MACHINE_MAXPHYS transfers, but
this may not be true. The capabilities of each controller variants should be
looked at more closely.

Revision 1.400: download - view: text, markup, annotated - select for diffs
Tue Jul 31 15:50:34 2012 UTC (14 years, 3 months ago) by bouyer
Branches: MAIN
Branch point for: tls-maxphys
Diff to: previous 1.399: preferred, colored
Changes since revision 1.399: +26 -14 lines
Apply back changes that were reverted on Jul 24 and Jul 26 (general ata/wdc
cleanup and SATA PMP support), now that I'm back to fix the fallouts.

Revision 1.399: download - view: text, markup, annotated - select for diffs
Thu Jul 26 20:49:48 2012 UTC (14 years, 3 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.398: preferred, colored
Changes since revision 1.398: +10 -22 lines
Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@

Revision 1.398: download - view: text, markup, annotated - select for diffs
Tue Jul 24 14:04:29 2012 UTC (14 years, 3 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.397: preferred, colored
Changes since revision 1.397: +8 -8 lines
Revert dsl@'s changes of Sun, 15 Jul 2012 10:55:35 +0000 and
Sun, 15 Jul 2012 10:56:50 +0000, excepting the kernel version bump.
First step in reverting regressions to ata(4) subsystem during the addition of
port multiplier support.

Revision 1.397: download - view: text, markup, annotated - select for diffs
Sun Jul 22 18:42:11 2012 UTC (14 years, 3 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.396: preferred, colored
Changes since revision 1.396: +6 -5 lines
FLUSH CACHE EXT is a 48-bit command, issue as such.  Both FLUSH CACHE commands
will return the LBA of first failure in the return task file, specifiy that we
want it read, even if we don't look at the value.

Revision 1.396: download - view: text, markup, annotated - select for diffs
Sun Jul 22 18:37:31 2012 UTC (14 years, 3 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.395: preferred, colored
Changes since revision 1.395: +3 -3 lines
ATA-6 and ACS-2 drafts both say the flush cache commands may take longer than
30 seconds to complete.  For now assume 5 minutes will always be enough.

Revision 1.395: download - view: text, markup, annotated - select for diffs
Sun Jul 15 10:55:29 2012 UTC (14 years, 4 months ago) by dsl
Branches: MAIN
Diff to: previous 1.394: preferred, colored
Changes since revision 1.394: +8 -8 lines
Some namespace protection (and add greppablity).
Prefix the DRIVE_ and DRIVET_ constants from atavar.h with ATA_.
Don't use an enum for drive_type - you don't know how big it will be.
Move driver_type to avoid implicit structure padding (esp on arm).
This change is purely lexical and mechanical.

Update to 6.99.9 - this wasn't done when the SATA PMP changes
were made - I'm sure they warranted a bump.

Revision 1.392.2.1: download - view: text, markup, annotated - select for diffs
Tue Jul 3 21:13:25 2012 UTC (14 years, 4 months ago) by jdc
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Diff to: previous 1.392: preferred, colored; next MAIN 1.393: preferred, colored
Changes since revision 1.392: +10 -2 lines
Pull up revision 1.393 (requested by bouyer in ticket #381).

In some case, when an error is reported by the disk, the ahci controller
still reports a number of bytes transfered equal to bcount.
This then triggers a KASSERT in physio_biodone:
        if (done == todo)
                KASSERT(bp->b_error == 0);
Detect this case in wd(4) (so that the workaround works for other controllers
too if they have the same issue, or if the issue is with the drive)
and claim we didn't read/write anything.

Revision 1.394: download - view: text, markup, annotated - select for diffs
Mon Jul 2 18:15:46 2012 UTC (14 years, 4 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.393: preferred, colored
Changes since revision 1.393: +22 -10 lines
Add sata Port MultiPlier (PMP) support to the ata bus layer,
as described in
http://mail-index.netbsd.org/tech-kern/2012/06/23/msg013442.html
PMP support in integrated to the atabus layer.
struct ata_channel's ch_drive[] is not dynamically allocated, and ch_ndrive
(renamed to ch_ndrives) closely reflects the size of the ch_drive[] array.
Add helper functions atabus_alloc_drives() and atabus_free_drives()
to manage ch_drive[]/ch_ndrives.
Add wdc_maxdrives to struct wdc_softc so that bus front-end can specify
how much drive they really support (master/slave or single).
ata_reset_drive() callback gains a uint32_t *sigp argument which,
when not NULL, will contain the signature of the device being reset.
While there, some cosmetic changes:
- added a drive_type enum to ata_drive_datas, and stop encoding the
  probed drive type in drive_flags (we were out of drive flags anyway).
- rename DRIVE_ATAPIST to DRIVE_ATAPIDSCW to better reflect what this
  really is
- remove ata_channel->ata_drives, it's redundant with the pointer in
  ata_drive_datas
- factor out the interpretation of SATA signatures in sata_interpet_sig()

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

Thanks to:
- Protocase (http://www.protocase.com/) which provided a system
  with lots of controllers, SATA PMP and drive slots
- Conservation Genomics Laboratory, Department of Biology, New Mexico State
  University for hosting the above system
- Brook Milligan, who set up remote access and has been very responsive
  when SATA cable move was needed

Revision 1.393: download - view: text, markup, annotated - select for diffs
Tue Jun 26 09:49:24 2012 UTC (14 years, 4 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.392: preferred, colored
Changes since revision 1.392: +10 -2 lines
In some case, when an error is reported by the disk, the ahci controller
still reports a number of bytes transfered equal to bcount.
This then triggers a KASSERT in physio_biodone:
        if (done == todo)
		KASSERT(bp->b_error == 0);
Detect this case in wd(4) (so that the workaround works for other controllers
too if they have the same issue, or if the issue is with the drive)
and claim we didn't read/write anything.

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

Revision 1.390.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:34:08 2012 UTC (14 years, 9 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.390: preferred, colored; next MAIN 1.391: preferred, colored
Changes since revision 1.390: +14 -19 lines
merge to -current.

Revision 1.392: download - view: text, markup, annotated - select for diffs
Thu Feb 2 19:43:02 2012 UTC (14 years, 9 months ago) by tls
Branches: MAIN
CVS tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10
Branch point for: netbsd-6
Diff to: previous 1.391: preferred, colored
Changes since revision 1.391: +2 -12 lines
Entropy-pool implementation move and cleanup.

1) Move core entropy-pool code and source/sink/sample management code
   to sys/kern from sys/dev.

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

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

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

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

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files).  Tested with release
builds on amd64 and evbarm and live testing on amd64.

Revision 1.391: download - view: text, markup, annotated - select for diffs
Tue Jan 24 20:04:07 2012 UTC (14 years, 9 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.390: preferred, colored
Changes since revision 1.390: +14 -9 lines
Rework struct ata_command to support LBA28 and LBA48-protocol commands.
Implement 28- and 48-bit command issuance and parameter read-back in the
various ATA host drivers. Add LBA28-protocol support to ATAIOCCOMMAND ioctl.

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

Revision 1.389: download - view: text, markup, annotated - select for diffs
Thu Oct 27 13:07:37 2011 UTC (15 years ago) by jakllsch
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache
Diff to: previous 1.388: preferred, colored
Changes since revision 1.388: +10 -3 lines
Attempt to complete the WD_QUIRK_SPLIT_MOD15_WRITE list.
Per Seagate Publication number 100221381, Rev. B, the ST360015AS
is the only other drive in the Seagate Barracuda Serial ATA V
family that was not already listed.

Also, correct spelling of "globing".

Revision 1.388: download - view: text, markup, annotated - select for diffs
Wed Oct 5 03:40:18 2011 UTC (15 years, 1 month ago) by jakllsch
Branches: MAIN
Diff to: previous 1.387: preferred, colored
Changes since revision 1.387: +19 -7 lines
Limit wd(4) transfers to 128 (512-byte) logical sectors, as the traditional
MAXPHYS value has for at least the past decade.

There are issues in wd(4) and possibly in host adapter drivers that need
work before this should be raised.

Revision 1.387: download - view: text, markup, annotated - select for diffs
Sat Jul 30 04:42:03 2011 UTC (15 years, 3 months ago) by jakllsch
Branches: MAIN
Diff to: previous 1.386: preferred, colored
Changes since revision 1.386: +5 -2 lines
Add some additional consistency checking paranoia with KASSERT.

Revision 1.385.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 6 09:07:45 2011 UTC (15 years, 5 months ago) by jruoho
Branches: jruoho-x86intr
Diff to: previous 1.385: preferred, colored; next MAIN 1.386: preferred, colored
Changes since revision 1.385: +5 -4 lines
Sync with HEAD.

Revision 1.384.2.1: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:53:06 2011 UTC (15 years, 8 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.384: preferred, colored; next MAIN 1.385: preferred, colored
Changes since revision 1.384: +12 -6 lines
sync with head

Revision 1.385.4.1: download - view: text, markup, annotated - select for diffs
Thu Feb 17 12:00:11 2011 UTC (15 years, 9 months ago) by bouyer
Branches: bouyer-quota2
Diff to: previous 1.385: preferred, colored; next MAIN 1.386: preferred, colored
Changes since revision 1.385: +5 -4 lines
Sync with HEAD

Revision 1.386: download - view: text, markup, annotated - select for diffs
Thu Feb 10 05:07:46 2011 UTC (15 years, 9 months ago) by enami
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base
Diff to: previous 1.385: preferred, colored
Changes since revision 1.385: +5 -4 lines
Start new line before issuing IDENTIFY command since messages from
other driver may interfere during waiting for command completion.

Revision 1.383.2.2: download - view: text, markup, annotated - select for diffs
Sat Nov 6 08:08:28 2010 UTC (16 years ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.383.2.1: preferred, colored; branchpoint 1.383: preferred, colored; next MAIN 1.384: preferred, colored
Changes since revision 1.383.2.1: +9 -4 lines
Sync with HEAD.

Revision 1.385: download - view: text, markup, annotated - select for diffs
Fri Nov 5 15:49:37 2010 UTC (16 years ago) by dyoung
Branches: MAIN
CVS tags: uebayasi-xip-base4, matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Diff to: previous 1.384: preferred, colored
Changes since revision 1.384: +9 -4 lines
Mark a buffer with EIO in wdstrategy() if the device is not "enabled"
(more like "present"), not if it is merely asleep.

If the device is not awake, get out of wdstart() right away.

Brett Lymn and KAMADA Ken'ichi report that this stops the kernel from
crashing after a suspend/resume cycle.

Revision 1.383.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:43:08 2010 UTC (16 years, 6 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.383: preferred, colored
Changes since revision 1.383: +4 -4 lines
Sync with HEAD.

Revision 1.363.8.1.4.1: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:27:34 2010 UTC (16 years, 7 months ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.363.8.1: preferred, colored; next MAIN 1.363.8.2: preferred, colored
Changes since revision 1.363.8.1: +23 -63 lines
sync to netbsd-5

Revision 1.360.4.5: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:03:24 2010 UTC (16 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.360.4.4: preferred, colored; branchpoint 1.360: preferred, colored; next MAIN 1.361: preferred, colored
Changes since revision 1.360.4.4: +27 -72 lines
sync with head

Revision 1.384: download - view: text, markup, annotated - select for diffs
Wed Feb 24 22:37:57 2010 UTC (16 years, 8 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Diff to: previous 1.383: preferred, colored
Changes since revision 1.383: +4 -4 lines
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.363.8.1.2.1: download - view: text, markup, annotated - select for diffs
Sat Jan 30 19:06:26 2010 UTC (16 years, 9 months ago) by snj
Branches: netbsd-5-0
CVS tags: netbsd-5-0-2-RELEASE
Diff to: previous 1.363.8.1: preferred, colored; next MAIN 1.363.8.2: preferred, colored
Changes since revision 1.363.8.1: +7 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #1269):
	sys/dev/ata/wd.c: revision 1.383 via patch
struct buf::b_iodone is not called at splbio() any more.
Make sure non-MPsafe iodone callbacks raise the SPL as appropriate.

Revision 1.363.8.4: download - view: text, markup, annotated - select for diffs
Sat Jan 30 19:02:14 2010 UTC (16 years, 9 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, 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, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.363.8.3: preferred, colored; branchpoint 1.363: preferred, colored; next MAIN 1.364: preferred, colored
Changes since revision 1.363.8.3: +7 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #1269):
	sys/dev/ata/wd.c: revision 1.383 via patch
struct buf::b_iodone is not called at splbio() any more.
Make sure non-MPsafe iodone callbacks raise the SPL as appropriate.

Revision 1.383: download - view: text, markup, annotated - select for diffs
Sat Jan 23 18:54:53 2010 UTC (16 years, 9 months ago) by bouyer
Branches: MAIN
CVS tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Diff to: previous 1.382: preferred, colored
Changes since revision 1.382: +7 -2 lines
struct buf::b_iodone is not called at splbio() any more.
Make sure non-MPsafe iodone callbacks raise the SPL as appropriate.

Revision 1.382: download - view: text, markup, annotated - select for diffs
Tue Jan 19 22:28:31 2010 UTC (16 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.381: preferred, colored
Changes since revision 1.381: +8 -8 lines
Get rid of last "easy" kernel symbols starting with __:
__assert -> kern_assert
__sigtimedwait1 -> sigtimedwait1
__wdstart -> wdstart1

The rest are MD and/or shared with userspace, so they will require
a little more involvement than what is available for this quick
"ride the 5.99.24 bump" action.

Revision 1.363.8.3: download - view: text, markup, annotated - select for diffs
Sun Jan 10 23:59:30 2010 UTC (16 years, 10 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.363.8.2: preferred, colored; branchpoint 1.363: preferred, colored
Changes since revision 1.363.8.2: +14 -59 lines
Pull up following revision(s) (requested by dsl in ticket #1220):
	sys/dev/ata/wd.c: revision 1.380
	sys/dev/ata/wdvar.h: revision 1.38
ATA sepcs changed the LBA48 boundary from 0xfffffff to 0xffffffe between
ATA6r1 and ATA6r3, which caused drives conform to ATA6r3 or later to
reject LBA28 commands at sector 0xfffffff.
Get the right idea from the LBA48 boundary from IDENTIFY words 60-61.
Remove the WD_QUIRK_FORCE_LBA48 quirk, associated tables entries and
autodetect code, it's not needed any more.
Based on patch sent to teck-kern by Christoph Badura, use of words 60-61
instead of a constant for the LBA48 boundary by me.

Revision 1.363.8.2: download - view: text, markup, annotated - select for diffs
Sun Jan 10 23:56:46 2010 UTC (16 years, 10 months ago) by snj
Branches: netbsd-5
Diff to: previous 1.363.8.1: preferred, colored; branchpoint 1.363: preferred, colored
Changes since revision 1.363.8.1: +6 -6 lines
Pull up following revision(s) (requested by dsl in ticket #1231):
	sys/dev/ata/atareg.h: revision 1.33
	sys/dev/ata/wd.c: revision 1.378
Add atap_max_lba member to ataparams for LBA48 Maximum Address. From OpenBSD.
While here, renumber some __reserved member names to be sequential.
Also, add a member for the World Wide Name.
Use atap_max_lba in wd.c instead of offsets into a __reserved member.

Revision 1.381: download - view: text, markup, annotated - select for diffs
Fri Jan 8 19:48:12 2010 UTC (16 years, 10 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.380: preferred, colored
Changes since revision 1.380: +4 -4 lines
Expand PMF_FN_* macros.

Revision 1.380: download - view: text, markup, annotated - select for diffs
Thu Dec 17 21:03:10 2009 UTC (16 years, 11 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.379: preferred, colored
Changes since revision 1.379: +14 -59 lines
ATA sepcs changed the LBA48 boundary from 0xfffffff to 0xffffffe between
ATA6r1 and ATA6r3, which caused drives conform to ATA6r3 or later to
reject LBA28 commands at sector 0xfffffff.
Get the right idea from the LBA48 boundary from IDENTIFY words 60-61.
Remove the WD_QUIRK_FORCE_LBA48 quirk, associated tables entries and
autodetect code, it's not needed any more.
Based on patch sent to teck-kern by Christoph Badura, use of words 60-61
instead of a constant for the LBA48 boundary by me.

Revision 1.379: download - view: text, markup, annotated - select for diffs
Mon Oct 19 18:41:12 2009 UTC (17 years, 1 month ago) by bouyer
Branches: MAIN
CVS tags: matt-premerge-20091211, jym-xensuspend-nbase
Diff to: previous 1.378: preferred, colored
Changes since revision 1.378: +2 -7 lines
Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !

Revision 1.368.2.2: download - view: text, markup, annotated - select for diffs
Thu Jul 23 23:31:46 2009 UTC (17 years, 3 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.368.2.1: preferred, colored; next MAIN 1.369: preferred, colored
Changes since revision 1.368.2.1: +36 -38 lines
Sync with HEAD.

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

Revision 1.378: download - view: text, markup, annotated - select for diffs
Mon Jun 8 15:09:35 2009 UTC (17 years, 5 months ago) by jakllsch
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, jymxensuspend-base
Diff to: previous 1.377: preferred, colored
Changes since revision 1.377: +6 -6 lines
Add atap_max_lba member to ataparams for LBA48 Maximum Address. From OpenBSD.
While here, renumber some __reserved member names to be sequential.
Also, add a member for the World Wide Name.

Use atap_max_lba in wd.c instead of offsets into a __reserved member.

Revision 1.377: download - view: text, markup, annotated - select for diffs
Wed May 20 03:26:21 2009 UTC (17 years, 6 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.376: preferred, colored
Changes since revision 1.376: +3 -3 lines
On second thought, let's call disk_predetach() disk_begindetach().
Verbs are good.

Revision 1.376: download - view: text, markup, annotated - select for diffs
Tue May 19 23:43:44 2009 UTC (17 years, 6 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.375: preferred, colored
Changes since revision 1.375: +11 -17 lines
Use disk_predetach().

Revision 1.375: download - view: text, markup, annotated - select for diffs
Tue May 19 19:56:10 2009 UTC (17 years, 6 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.374: preferred, colored
Changes since revision 1.374: +7 -25 lines
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.360.4.3: download - view: text, markup, annotated - select for diffs
Sat May 16 10:41:19 2009 UTC (17 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.360.4.2: preferred, colored; branchpoint 1.360: preferred, colored
Changes since revision 1.360.4.2: +41 -19 lines
sync with head

Revision 1.374: download - view: text, markup, annotated - select for diffs
Fri May 15 23:49:28 2009 UTC (17 years, 6 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-nfs-mp-base4
Diff to: previous 1.373: preferred, colored
Changes since revision 1.373: +33 -11 lines
Do not detach a wd(4) instance if it is open, but return EBUSY,
instead.  If the detach is forced, do what wdclose() does on the
last close: flush the cache, clear the flag WDF_LOADED, and delete
our reference to the ATA bus device.

Revision 1.368.2.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:19:11 2009 UTC (17 years, 6 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.368: preferred, colored
Changes since revision 1.368: +12 -12 lines
Sync with HEAD.

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

Revision 1.373: download - view: text, markup, annotated - select for diffs
Tue May 12 14:16:53 2009 UTC (17 years, 6 months ago) by cegger
Branches: MAIN
CVS tags: jym-xensuspend-base
Diff to: previous 1.372: preferred, colored
Changes since revision 1.372: +10 -10 lines
struct device * -> device_t, no functional changes intended.

Revision 1.372: download - view: text, markup, annotated - select for diffs
Tue May 12 12:10:29 2009 UTC (17 years, 6 months ago) by cegger
Branches: MAIN
Diff to: previous 1.371: preferred, colored
Changes since revision 1.371: +4 -4 lines
struct cfdata * -> cfdata_t, no functional changes intended.

Revision 1.360.4.2: download - view: text, markup, annotated - select for diffs
Mon May 4 08:12:35 2009 UTC (17 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.360.4.1: preferred, colored; branchpoint 1.360: preferred, colored
Changes since revision 1.360.4.1: +29 -22 lines
sync with head.

Revision 1.363.6.3: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:35:20 2009 UTC (17 years, 6 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.363.6.2: preferred, colored; branchpoint 1.363: preferred, colored; next MAIN 1.364: preferred, colored
Changes since revision 1.363.6.2: +4 -4 lines
Sync with HEAD.

Revision 1.371: download - view: text, markup, annotated - select for diffs
Thu Apr 2 00:09:32 2009 UTC (17 years, 7 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Diff to: previous 1.370: preferred, colored
Changes since revision 1.370: +4 -4 lines
During shutdown, detach devices in an orderly fashion.

Call the detach routine for every device in the device tree, starting
with the leaves and moving toward the root, expecting that each
(pseudo-)device driver will use the opportunity to gracefully commit
outstandings transactions to the underlying (pseudo-)device and to
relinquish control of the hardware to the system BIOS.

Detaching devices is not suitable for every shutdown: in an emergency,
or if the system state is inconsistent, we should resort to a fast,
simple shutdown that uses only the pmf(9) shutdown hooks and the
(deprecated) shutdownhooks.  For now, if the flag RB_NOSYNC is set in
boothowto, opt for the fast, simple shutdown.

Add a device flag, DVF_DETACH_SHUTDOWN, that indicates by its presence
that it is safe to detach a device during shutdown.  Introduce macros
CFATTACH_DECL3() and CFATTACH_DECL3_NEW() for creating autoconf
attachments with default device flags.  Add DVF_DETACH_SHUTDOWN
to configuration attachments for atabus(4), atw(4) at cardbus(4),
cardbus(4), cardslot(4), com(4) at isa(4), elanpar(4), elanpex(4),
elansc(4), gpio(4), npx(4) at isa(4), nsphyter(4), pci(4), pcib(4),
pcmcia(4), ppb(4), sip(4), wd(4), and wdc(4) at isa(4).

Add a device-detachment "reason" flag, DETACH_SHUTDOWN, that tells the
autoconf code and a device driver that the reason for detachment is
system shutdown.

Add a sysctl, kern.detachall, that tells the system to try to detach
every device at shutdown, regardless of any device's DVF_DETACH_SHUTDOWN
flag.  The default for kern.detachall is 0.  SET IT TO 1, PLEASE, TO
HELP TEST AND DEBUG DEVICE DETACHMENT AT SHUTDOWN.

This is a work in progress.  In future work, I aim to treat
pseudo-devices more thoroughly, and to gracefully tear down a stack of
(pseudo-)disk drivers and filesystems, including cgd(4), vnd(4), and
raid(4) instances at shutdown.

Also commit some changes that are not easily untangled from the rest:

(1) begin to simplify device_t locking: rename struct pmf_private to
device_lock, and incorporate device_lock into struct device.

(2) #include <sys/device.h> in sys/pmf.h in order to get some
definitions that it needs.  Stop unnecessarily #including <sys/device.h>
in sys/arch/x86/include/pic.h to keep the amd64, xen, and i386 releases
building.

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

Revision 1.363.8.1: download - view: text, markup, annotated - select for diffs
Wed Feb 18 00:23:09 2009 UTC (17 years, 9 months ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-1-RELEASE, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: netbsd-5-0, matt-nb5-mips64
Diff to: previous 1.363: preferred, colored
Changes since revision 1.363: +7 -3 lines
Pull up following revision(s) (requested by drochner in ticket #441):
	sys/dev/ata/wd.c: revision 1.368
	sys/dev/pcmcia/wdc_pcmcia.c: revision 1.113
-in the wdc@pcmcia driver, don't try to powerup/down while cold or
 shutting down -- this is only supposed to happen from the pcmcia
 kernel thread while the system is running
-in wd_shutdown, call ata_addref first, so that the adapter is either
 active or we know that it isn't
This fixes a hang on shutdown-p reported by Dennis den Brok per
PR kern/40531. Verified by by Dennis and me.
(reported against 5.0-Beta, so this is a pullup candidate)

Revision 1.370: download - view: text, markup, annotated - select for diffs
Tue Feb 10 19:45:22 2009 UTC (17 years, 9 months ago) by tron
Branches: MAIN
CVS tags: nick-hppapmap-base2
Diff to: previous 1.369: preferred, colored
Changes since revision 1.369: +0 -4 lines
Backout LBA 48 quick entries which were added to fix one aspect of
PR kern/40569 because of objections by Manual Bouyer.

Revision 1.369: download - view: text, markup, annotated - select for diffs
Mon Feb 9 22:34:23 2009 UTC (17 years, 9 months ago) by tron
Branches: MAIN
Diff to: previous 1.368: preferred, colored
Changes since revision 1.368: +6 -2 lines
Add two more entries to the quirk table for hard disks which need the
LBA 48 work around. The first entry will watch the Seagate ST3160815AS
(and similar models), the second one HP's OEM version of the same drive.

This avoids the RAID rebuild problems described in PR kern/40569.

Revision 1.368: download - view: text, markup, annotated - select for diffs
Fri Feb 6 13:43:11 2009 UTC (17 years, 9 months ago) by drochner
Branches: MAIN
Branch point for: jym-xensuspend
Diff to: previous 1.367: preferred, colored
Changes since revision 1.367: +7 -3 lines
-in the wdc@pcmcia driver, don't try to powerup/down while cold or
 shutting down -- this is only supposed to happen from the pcmcia
 kernel thread while the system is running
-in wd_shutdown, call ata_addref first, so that the adapter is either
 active or we know that it isn't
This fixes a hang on shutdown-p reported by Dennis den Brok per
PR kern/40531. Verified by by Dennis and me.
(reported against 5.0-Beta, so this is a pullup candidate)

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

Revision 1.355.6.7: download - view: text, markup, annotated - select for diffs
Sat Jan 17 13:28:52 2009 UTC (17 years, 10 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.355.6.6: preferred, colored; branchpoint 1.355: preferred, colored; next MAIN 1.356: preferred, colored
Changes since revision 1.355.6.6: +13 -10 lines
Sync with HEAD.

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

Revision 1.366: download - view: text, markup, annotated - select for diffs
Tue Dec 16 22:35:29 2008 UTC (17 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.365: preferred, colored
Changes since revision 1.365: +6 -7 lines
replace bitmask_snprintf(9) with snprintb(3)

Revision 1.365: download - view: text, markup, annotated - select for diffs
Sat Dec 13 19:38:20 2008 UTC (17 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.364: preferred, colored
Changes since revision 1.364: +7 -5 lines
more debugging in the dump path.

Revision 1.363.4.1: download - view: text, markup, annotated - select for diffs
Sat Dec 13 01:14:13 2008 UTC (17 years, 11 months ago) by haad
Branches: haad-dm
Diff to: previous 1.363: preferred, colored; next MAIN 1.364: preferred, colored
Changes since revision 1.363: +4 -2 lines
Update haad-dm branch to haad-dm-base2.

Revision 1.364: download - view: text, markup, annotated - select for diffs
Fri Dec 5 18:20:19 2008 UTC (17 years, 11 months ago) by dyoung
Branches: MAIN
CVS tags: haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Diff to: previous 1.363: preferred, colored
Changes since revision 1.363: +4 -2 lines
In wddetach(), avoid a crash by destroying the callout sc_restart_ch.

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

Revision 1.362.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 23 04:30:58 2008 UTC (18 years, 4 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.362: preferred, colored; next MAIN 1.363: preferred, colored
Changes since revision 1.362: +9 -9 lines
Sync w/ -current. 34 merge conflicts to follow.

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

Revision 1.363: download - view: text, markup, annotated - select for diffs
Sun Jun 8 18:34:06 2008 UTC (18 years, 5 months ago) by tsutsui
Branches: MAIN
CVS tags: yamt-pf42-base4, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, netbsd-5-base, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5, haad-dm
Diff to: previous 1.362: preferred, colored
Changes since revision 1.362: +9 -9 lines
Use device_lookup_private() rathter than device_private(device_lookup()).

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

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

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

Revision 1.360.4.1: download - view: text, markup, annotated - select for diffs
Fri May 16 02:23:53 2008 UTC (18 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.360: preferred, colored
Changes since revision 1.360: +3 -9 lines
sync with head.

Revision 1.362: download - view: text, markup, annotated - select for diffs
Fri May 2 21:11:00 2008 UTC (18 years, 6 months ago) by plunky
Branches: MAIN
CVS tags: yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa
Diff to: previous 1.361: preferred, colored
Changes since revision 1.361: +3 -2 lines
disk_destroy() is needed when the disk structure is no longer required,
this fixes PR kern/38131

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

Revision 1.298.2.12.2.3: download - view: text, markup, annotated - select for diffs
Tue Apr 8 22:09:38 2008 UTC (18 years, 7 months ago) by jdc
Branches: netbsd-3-1
Diff to: previous 1.298.2.12.2.2: preferred, colored; branchpoint 1.298.2.12: preferred, colored; next MAIN 1.298.2.13: preferred, colored
Changes since revision 1.298.2.12.2.2: +3 -3 lines
Pull up revision 1.359 (requested by bouyer in ticket #1910).

The Hitachi HDP725025GLA380 returns "aborted command" instead of
"id not found" when hitting the LBA48 bug, so also install the
LBA48 bug workaround on "aborted command" errors.

Revision 1.298.2.15: download - view: text, markup, annotated - select for diffs
Tue Apr 8 21:35:51 2008 UTC (18 years, 7 months ago) by jdc
Branches: netbsd-3
Diff to: previous 1.298.2.14: preferred, colored; branchpoint 1.298: preferred, colored; next MAIN 1.299: preferred, colored
Changes since revision 1.298.2.14: +3 -3 lines
Pull up revision 1.359 (requested by bouyer in ticket #1910).

The Hitachi HDP725025GLA380 returns "aborted command" instead of
"id not found" when hitting the LBA48 bug, so also install the
LBA48 bug workaround on "aborted command" errors.

Revision 1.298.2.7.2.8: download - view: text, markup, annotated - select for diffs
Tue Apr 8 21:35:31 2008 UTC (18 years, 7 months ago) by jdc
Branches: netbsd-3-0
Diff to: previous 1.298.2.7.2.7: preferred, colored; branchpoint 1.298.2.7: preferred, colored; next MAIN 1.298.2.8: preferred, colored
Changes since revision 1.298.2.7.2.7: +3 -3 lines
Pull up revision 1.359 (requested by bouyer in ticket #1910).

The Hitachi HDP725025GLA380 returns "aborted command" instead of
"id not found" when hitting the LBA48 bug, so also install the
LBA48 bug workaround on "aborted command" errors.

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

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

Revision 1.355.6.3: download - view: text, markup, annotated - select for diffs
Fri Apr 4 21:21:11 2008 UTC (18 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.355.6.2: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.6.2: +6 -6 lines
* Catch up with selnotify() changes.

* Catch up with some softc changes in HEAD.

* More s/dctl/devfsctl/ changes.

* Remove debugging printfs from init(8) that slipped in by mistake.

* Cosmetic changes in devfsd, allow multiple attributes to be set in
  one rule. Switch from err() to syslog() messages.

* Fix etc/devfsd.conf, I'd made some changes previously that had syntax
  errors.

Revision 1.355.6.2: download - view: text, markup, annotated - select for diffs
Thu Apr 3 12:42:38 2008 UTC (18 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.355.6.1: preferred, colored; branchpoint 1.355: preferred, colored
Changes since revision 1.355.6.1: +69 -61 lines
Sync with HEAD.

Revision 1.335.2.2: download - view: text, markup, annotated - select for diffs
Sun Mar 30 14:45:03 2008 UTC (18 years, 7 months ago) by jdc
Branches: netbsd-4
CVS tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base
Diff to: previous 1.335.2.1: preferred, colored; branchpoint 1.335: preferred, colored; next MAIN 1.336: preferred, colored
Changes since revision 1.335.2.1: +3 -3 lines
Pull up revision 1.359 (requested by bouyer in ticket #1094).

The Hitachi HDP725025GLA380 returns "aborted command" instead of
"id not found" when hitting the LBA48 bug, so also install the
LBA48 bug workaround on "aborted command" errors.

Revision 1.335.2.1.4.1: download - view: text, markup, annotated - select for diffs
Sun Mar 30 14:44:42 2008 UTC (18 years, 7 months ago) by jdc
Branches: netbsd-4-0
CVS tags: netbsd-4-0-1-RELEASE
Diff to: previous 1.335.2.1: preferred, colored; next MAIN 1.335.2.2: preferred, colored
Changes since revision 1.335.2.1: +3 -3 lines
Pull up revision 1.359 (requested by bouyer in ticket #1094).

The Hitachi HDP725025GLA380 returns "aborted command" instead of
"id not found" when hitting the LBA48 bug, so also install the
LBA48 bug workaround on "aborted command" errors.

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

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

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

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

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

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

Revision 1.305.2.10: download - view: text, markup, annotated - select for diffs
Mon Mar 24 09:38:46 2008 UTC (18 years, 7 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.305.2.9: preferred, colored; next MAIN 1.306: preferred, colored
Changes since revision 1.305.2.9: +51 -46 lines
sync with head.

Revision 1.355.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 24 07:15:15 2008 UTC (18 years, 7 months ago) by keiichi
Branches: keiichi-mipv6
Diff to: previous 1.355: preferred, colored; next MAIN 1.356: preferred, colored
Changes since revision 1.355: +69 -61 lines
sync with head.

Revision 1.343.6.4: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:04:36 2008 UTC (18 years, 7 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.343.6.3: preferred, colored; branchpoint 1.343: preferred, colored; next MAIN 1.344: preferred, colored
Changes since revision 1.343.6.3: +69 -61 lines
sync with HEAD

Revision 1.360: download - view: text, markup, annotated - select for diffs
Tue Mar 18 20:46:36 2008 UTC (18 years, 8 months ago) by cube
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp
Diff to: previous 1.359: preferred, colored
Changes since revision 1.359: +51 -46 lines
Split device_t and softc for ATA devices, as well as wd(4).  Other
cosmetic changes where appropriate.

Revision 1.305.2.9: download - view: text, markup, annotated - select for diffs
Mon Mar 17 09:14:37 2008 UTC (18 years, 8 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.305.2.8: preferred, colored
Changes since revision 1.305.2.8: +12 -19 lines
sync with head.

Revision 1.359: download - view: text, markup, annotated - select for diffs
Fri Feb 29 21:51:38 2008 UTC (18 years, 8 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.358: preferred, colored
Changes since revision 1.358: +3 -3 lines
The Hitachi HDP725025GLA380 returns "aborted command" instead of
"id not found" when hitting the LBA48 bug, so also install the
LBA48 bug workaround on "aborted command" errors.

Revision 1.358: download - view: text, markup, annotated - select for diffs
Fri Feb 29 06:38:28 2008 UTC (18 years, 8 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.357: preferred, colored
Changes since revision 1.357: +4 -4 lines
Use PMF_FN_ARGS, PMF_FN_PROTO.

Revision 1.357: download - view: text, markup, annotated - select for diffs
Thu Feb 28 14:40:17 2008 UTC (18 years, 8 months ago) by drochner
Branches: MAIN
Diff to: previous 1.356: preferred, colored
Changes since revision 1.356: +9 -16 lines
use pmf again to register the shutdown handler, instead of
shutdownhook_establish()

Revision 1.305.2.8: download - view: text, markup, annotated - select for diffs
Wed Feb 27 08:36:31 2008 UTC (18 years, 8 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.305.2.7: preferred, colored
Changes since revision 1.305.2.7: +23 -13 lines
sync with head.

Revision 1.356: download - view: text, markup, annotated - select for diffs
Thu Feb 21 21:52:06 2008 UTC (18 years, 8 months ago) by drochner
Branches: MAIN
CVS tags: hpcarm-cleanup-base
Diff to: previous 1.355: preferred, colored
Changes since revision 1.355: +23 -13 lines
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.348.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:05:36 2008 UTC (18 years, 9 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.348.2.2: preferred, colored; branchpoint 1.348: preferred, colored; next MAIN 1.349: preferred, colored
Changes since revision 1.348.2.2: +21 -16 lines
Sync with HEAD.

Revision 1.305.2.7: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:42:38 2008 UTC (18 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.305.2.6: preferred, colored
Changes since revision 1.305.2.6: +52 -38 lines
sync with head

Revision 1.343.6.3: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:52:26 2008 UTC (18 years, 10 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.343.6.2: preferred, colored; branchpoint 1.343: preferred, colored
Changes since revision 1.343.6.2: +52 -38 lines
sync with HEAD

Revision 1.351.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 2 21:53:56 2008 UTC (18 years, 10 months ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.351.2.1: preferred, colored; next MAIN 1.352: preferred, colored
Changes since revision 1.351.2.1: +31 -23 lines
Sync with HEAD

Revision 1.355: download - view: text, markup, annotated - select for diffs
Wed Jan 2 11:48:37 2008 UTC (18 years, 10 months ago) by ad
Branches: MAIN
CVS tags: 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
Diff to: previous 1.354: preferred, colored
Changes since revision 1.354: +21 -16 lines
Merge vmlocking2 to head.

Revision 1.348.2.2: download - view: text, markup, annotated - select for diffs
Thu Dec 27 00:44:56 2007 UTC (18 years, 10 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.348.2.1: preferred, colored; branchpoint 1.348: preferred, colored
Changes since revision 1.348.2.1: +33 -24 lines
Sync with HEAD.

Revision 1.350.2.2: download - view: text, markup, annotated - select for diffs
Wed Dec 26 21:39:23 2007 UTC (18 years, 10 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.350.2.1: preferred, colored; branchpoint 1.350: preferred, colored; next MAIN 1.351: preferred, colored
Changes since revision 1.350.2.1: +33 -24 lines
Sync with head.

Revision 1.354: download - view: text, markup, annotated - select for diffs
Tue Dec 18 15:30:40 2007 UTC (18 years, 11 months ago) by joerg
Branches: MAIN
CVS tags: vmlocking2-base3
Diff to: previous 1.353: preferred, colored
Changes since revision 1.353: +14 -11 lines
Restore suspend handler. Put the disc into standby on suspend and for
powerdown, but not for normal halt or reboot or panic. Fixes PR 37508.

Revision 1.351.2.1: download - view: text, markup, annotated - select for diffs
Thu Dec 13 21:55:25 2007 UTC (18 years, 11 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.351: preferred, colored
Changes since revision 1.351: +10 -4 lines
Sync with HEAD

Revision 1.350.4.1: download - view: text, markup, annotated - select for diffs
Tue Dec 11 15:25:30 2007 UTC (18 years, 11 months ago) by yamt
Branches: yamt-kmem
Diff to: previous 1.350: preferred, colored; next MAIN 1.351: preferred, colored
Changes since revision 1.350: +30 -24 lines
sync with head.

Revision 1.353: download - view: text, markup, annotated - select for diffs
Tue Dec 11 02:02:31 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: MAIN
CVS tags: yamt-kmem-base3, yamt-kmem-base2, cube-autoconf-base, cube-autoconf
Diff to: previous 1.352: preferred, colored
Changes since revision 1.352: +10 -6 lines
Make this compile again.

Revision 1.352: download - view: text, markup, annotated - select for diffs
Tue Dec 11 01:52:18 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.351: preferred, colored
Changes since revision 1.351: +4 -2 lines
Disable the wd_suspend power handler on the proper branch, workaround for
kern/37508

Revision 1.343.4.9: download - view: text, markup, annotated - select for diffs
Tue Dec 11 01:50:47 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.343.4.8: preferred, colored; branchpoint 1.343: preferred, colored; next MAIN 1.344: preferred, colored
Changes since revision 1.343.4.8: +2 -4 lines
Wrong branch, backout previous.

Revision 1.343.4.8: download - view: text, markup, annotated - select for diffs
Tue Dec 11 01:49:45 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.343.4.7: preferred, colored; branchpoint 1.343: preferred, colored
Changes since revision 1.343.4.7: +4 -2 lines
Disable the wd_suspend power handler.

Revision 1.351: download - view: text, markup, annotated - select for diffs
Sun Dec 9 20:27:54 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: MAIN
Branch point for: bouyer-xeni386
Diff to: previous 1.350: preferred, colored
Changes since revision 1.350: +24 -24 lines
Merge jmcneill-pm branch.

Revision 1.343.4.7: download - view: text, markup, annotated - select for diffs
Sat Dec 8 16:21:06 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.343.4.6: preferred, colored; branchpoint 1.343: preferred, colored
Changes since revision 1.343.4.6: +4 -4 lines
Rename pnp(9) -> pmf(9), as requested by many.

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

Revision 1.348.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 19 00:47:43 2007 UTC (19 years ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.348: preferred, colored
Changes since revision 1.348: +8 -6 lines
Sync with HEAD.

Revision 1.305.2.6: download - view: text, markup, annotated - select for diffs
Thu Nov 15 11:44:04 2007 UTC (19 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.305.2.5: preferred, colored
Changes since revision 1.305.2.5: +10 -6 lines
sync with head.

Revision 1.346.2.2: download - view: text, markup, annotated - select for diffs
Tue Nov 13 16:00:53 2007 UTC (19 years ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.346.2.1: preferred, colored; branchpoint 1.346: preferred, colored; next MAIN 1.347: preferred, colored
Changes since revision 1.346.2.1: +8 -4 lines
Sync with HEAD

Revision 1.343.4.6: download - view: text, markup, annotated - select for diffs
Sun Nov 11 16:47:29 2007 UTC (19 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.343.4.5: preferred, colored; branchpoint 1.343: preferred, colored
Changes since revision 1.343.4.5: +7 -6 lines
Sync with HEAD.

Revision 1.343.6.2: download - view: text, markup, annotated - select for diffs
Thu Nov 8 10:59:47 2007 UTC (19 years ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.343.6.1: preferred, colored; branchpoint 1.343: preferred, colored
Changes since revision 1.343.6.1: +8 -6 lines
sync with -HEAD

Revision 1.350: download - view: text, markup, annotated - select for diffs
Wed Nov 7 08:59:03 2007 UTC (19 years ago) by itohy
Branches: MAIN
CVS tags: yamt-kmem-base, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: yamt-kmem, vmlocking2
Diff to: previous 1.349: preferred, colored
Changes since revision 1.349: +6 -4 lines
more KNF changes

Revision 1.349: download - view: text, markup, annotated - select for diffs
Wed Nov 7 08:56:41 2007 UTC (19 years ago) by itohy
Branches: MAIN
Diff to: previous 1.348: preferred, colored
Changes since revision 1.348: +4 -4 lines
KNF or make it compile by gcc 2

Revision 1.343.6.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:25:41 2007 UTC (19 years ago) by matt
Branches: matt-armv6
Diff to: previous 1.343: preferred, colored
Changes since revision 1.343: +31 -10 lines
sync with HEAD

Revision 1.343.4.5: download - view: text, markup, annotated - select for diffs
Tue Nov 6 14:27:14 2007 UTC (19 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.343.4.4: preferred, colored; branchpoint 1.343: preferred, colored
Changes since revision 1.343.4.4: +15 -51 lines
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.343.4.4: download - view: text, markup, annotated - select for diffs
Wed Oct 31 23:14:04 2007 UTC (19 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.343.4.3: preferred, colored; branchpoint 1.343: preferred, colored
Changes since revision 1.343.4.3: +4 -2 lines
Sync with HEAD.

Revision 1.348: download - view: text, markup, annotated - select for diffs
Wed Oct 31 09:51:20 2007 UTC (19 years ago) by jnemeth
Branches: MAIN
CVS tags: jmcneill-base
Branch point for: mjf-devfs
Diff to: previous 1.347: preferred, colored
Changes since revision 1.347: +4 -2 lines
PR/37251 - Brian Buhrow -- FORCE_LBA48 on seagate drives larger then 1TB

Revision 1.305.2.5: download - view: text, markup, annotated - select for diffs
Sat Oct 27 11:30:05 2007 UTC (19 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.305.2.4: preferred, colored
Changes since revision 1.305.2.4: +29 -10 lines
sync with head.

Revision 1.343.4.3: download - view: text, markup, annotated - select for diffs
Fri Oct 26 15:44:16 2007 UTC (19 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.343.4.2: preferred, colored; branchpoint 1.343: preferred, colored
Changes since revision 1.343.4.2: +5 -6 lines
Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.346.2.1: download - view: text, markup, annotated - select for diffs
Thu Oct 25 22:37:10 2007 UTC (19 years ago) by bouyer
Branches: bouyer-xenamd64
Diff to: previous 1.346: preferred, colored
Changes since revision 1.346: +4 -4 lines
Sync with HEAD.

Revision 1.337.2.11: download - view: text, markup, annotated - select for diffs
Tue Oct 23 20:06:54 2007 UTC (19 years ago) by ad
Branches: vmlocking
Diff to: previous 1.337.2.10: preferred, colored; branchpoint 1.337: preferred, colored; next MAIN 1.338: preferred, colored
Changes since revision 1.337.2.10: +4 -4 lines
Sync with head.

Revision 1.347: download - view: text, markup, annotated - select for diffs
Fri Oct 19 11:59:37 2007 UTC (19 years, 1 month ago) by ad
Branches: MAIN
Diff to: previous 1.346: preferred, colored
Changes since revision 1.346: +4 -4 lines
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h

Revision 1.343.4.2: download - view: text, markup, annotated - select for diffs
Tue Oct 16 13:04:59 2007 UTC (19 years, 1 month ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.343.4.1: preferred, colored; branchpoint 1.343: preferred, colored
Changes since revision 1.343.4.1: +54 -17 lines
Replace shutdown hook to flush cache with PNP style power handler to
flush the disk cache also on suspend.

Revision 1.274.2.14: download - view: text, markup, annotated - select for diffs
Mon Oct 15 23:11:38 2007 UTC (19 years, 1 month ago) by riz
Branches: netbsd-2-0
Diff to: previous 1.274.2.13: preferred, colored; branchpoint 1.274: preferred, colored; next MAIN 1.275: preferred, colored
Changes since revision 1.274.2.13: +24 -4 lines
Pull up following revision(s) (requested by bouyer in ticket #11369):
	sys/dev/ata/wd.c: revision 1.345
Add a workaround for drives with the LBA48 bug:
if we get a "ID not found" error for a transfer crossing LBA48_THRESHOLD,
and the drive is larger than 128GB, automatically add WD_QUIRK_FORCE_LBA48
to the drive's quirks and retry the transfers.
Hopefully this will obsolete the WD_QUIRK_FORCE_LBA48 quirk list ...

Revision 1.274.2.8.2.6.2.6: download - view: text, markup, annotated - select for diffs
Mon Oct 15 23:10:19 2007 UTC (19 years, 1 month ago) by riz
Branches: netbsd-2-1
Diff to: previous 1.274.2.8.2.6.2.5: preferred, colored; branchpoint 1.274.2.8.2.6: preferred, colored; next MAIN 1.274.2.8.2.7: preferred, colored
Changes since revision 1.274.2.8.2.6.2.5: +24 -4 lines
Pull up following revision(s) (requested by bouyer in ticket #11369):
	sys/dev/ata/wd.c: revision 1.345
Add a workaround for drives with the LBA48 bug:
if we get a "ID not found" error for a transfer crossing LBA48_THRESHOLD,
and the drive is larger than 128GB, automatically add WD_QUIRK_FORCE_LBA48
to the drive's quirks and retry the transfers.
Hopefully this will obsolete the WD_QUIRK_FORCE_LBA48 quirk list ...

Revision 1.274.2.8.2.12: download - view: text, markup, annotated - select for diffs
Mon Oct 15 23:07:36 2007 UTC (19 years, 1 month ago) by riz
Branches: netbsd-2
Diff to: previous 1.274.2.8.2.11: preferred, colored; branchpoint 1.274.2.8: preferred, colored; next MAIN 1.274.2.9: preferred, colored
Changes since revision 1.274.2.8.2.11: +24 -4 lines
Pull up following revision(s) (requested by bouyer in ticket #11369):
	sys/dev/ata/wd.c: revision 1.345
Add a workaround for drives with the LBA48 bug:
if we get a "ID not found" error for a transfer crossing LBA48_THRESHOLD,
and the drive is larger than 128GB, automatically add WD_QUIRK_FORCE_LBA48
to the drive's quirks and retry the transfers.
Hopefully this will obsolete the WD_QUIRK_FORCE_LBA48 quirk list ...

Revision 1.298.2.12.2.2: download - view: text, markup, annotated - select for diffs
Mon Oct 15 21:55:51 2007 UTC (19 years, 1 month ago) by riz
Branches: netbsd-3-1
Diff to: previous 1.298.2.12.2.1: preferred, colored; branchpoint 1.298.2.12: preferred, colored
Changes since revision 1.298.2.12.2.1: +22 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #1848):
	sys/dev/ata/wd.c: revision 1.345
Add a workaround for drives with the LBA48 bug:
if we get a "ID not found" error for a transfer crossing LBA48_THRESHOLD,
and the drive is larger than 128GB, automatically add WD_QUIRK_FORCE_LBA48
to the drive's quirks and retry the transfers.
Hopefully this will obsolete the WD_QUIRK_FORCE_LBA48 quirk list ...

Revision 1.298.2.7.2.7: download - view: text, markup, annotated - select for diffs
Mon Oct 15 21:54:31 2007 UTC (19 years, 1 month ago) by riz
Branches: netbsd-3-0
Diff to: previous 1.298.2.7.2.6: preferred, colored; branchpoint 1.298.2.7: preferred, colored
Changes since revision 1.298.2.7.2.6: +24 -4 lines
Pull up following revision(s) (requested by bouyer in ticket #1848):
	sys/dev/ata/wd.c: revision 1.345
Add a workaround for drives with the LBA48 bug:
if we get a "ID not found" error for a transfer crossing LBA48_THRESHOLD,
and the drive is larger than 128GB, automatically add WD_QUIRK_FORCE_LBA48
to the drive's quirks and retry the transfers.
Hopefully this will obsolete the WD_QUIRK_FORCE_LBA48 quirk list ...

Revision 1.298.2.14: download - view: text, markup, annotated - select for diffs
Mon Oct 15 21:53:53 2007 UTC (19 years, 1 month ago) by riz
Branches: netbsd-3
Diff to: previous 1.298.2.13: preferred, colored; branchpoint 1.298: preferred, colored
Changes since revision 1.298.2.13: +22 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #1848):
	sys/dev/ata/wd.c: revision 1.345
Add a workaround for drives with the LBA48 bug:
if we get a "ID not found" error for a transfer crossing LBA48_THRESHOLD,
and the drive is larger than 128GB, automatically add WD_QUIRK_FORCE_LBA48
to the drive's quirks and retry the transfers.
Hopefully this will obsolete the WD_QUIRK_FORCE_LBA48 quirk list ...

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

Revision 1.337.2.10: download - view: text, markup, annotated - select for diffs
Tue Oct 9 15:22:09 2007 UTC (19 years, 1 month ago) by ad
Branches: vmlocking
Diff to: previous 1.337.2.9: preferred, colored; branchpoint 1.337: preferred, colored
Changes since revision 1.337.2.9: +26 -6 lines
Sync with head.

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

Revision 1.343.4.1: download - view: text, markup, annotated - select for diffs
Tue Oct 2 18:28:19 2007 UTC (19 years, 1 month ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.343: preferred, colored
Changes since revision 1.343: +26 -6 lines
Sync with HEAD.

Revision 1.335.4.1: download - view: text, markup, annotated - select for diffs
Sun Sep 30 03:39:05 2007 UTC (19 years, 1 month ago) by wrstuden
Branches: wrstuden-fixsa
Diff to: previous 1.335: preferred, colored
Changes since revision 1.335: +24 -4 lines
Catch up on netbsd-4 as of a few days ago.

Revision 1.335.2.1: download - view: text, markup, annotated - select for diffs
Tue Sep 25 00:53:15 2007 UTC (19 years, 1 month ago) by xtraeme
Branches: netbsd-4
CVS tags: wrstuden-fixsa-base-1, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, matt-nb4-arm-base, matt-nb4-arm
Branch point for: netbsd-4-0
Diff to: previous 1.335: preferred, colored
Changes since revision 1.335: +24 -4 lines
Pull up following revision(s) (requested by bouyer in ticket #899):
	sys/dev/ata/wd.c: revision 1.345

Add a workaround for drives with the LBA48 bug:
if we get a "ID not found" error for a transfer crossing LBA48_THRESHOLD,
and the drive is larger than 128GB, automatically add WD_QUIRK_FORCE_LBA48
to the drive's quirks and retry the transfers.
Hopefully this will obsolete the WD_QUIRK_FORCE_LBA48 quirk list ...

Revision 1.345: download - view: text, markup, annotated - select for diffs
Sun Sep 16 18:41:47 2007 UTC (19 years, 2 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-x86pmap-base2, yamt-x86pmap-base
Branch point for: yamt-x86pmap
Diff to: previous 1.344: preferred, colored
Changes since revision 1.344: +24 -4 lines
Add a workaround for drives with the LBA48 bug:
if we get a "ID not found" error for a transfer crossing LBA48_THRESHOLD,
and the drive is larger than 128GB, automatically add WD_QUIRK_FORCE_LBA48
to the drive's quirks and retry the transfers.
Hopefully this will obsolete the WD_QUIRK_FORCE_LBA48 quirk list ...

Revision 1.340.2.2: download - view: text, markup, annotated - select for diffs
Mon Sep 10 10:54:49 2007 UTC (19 years, 2 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.340.2.1: preferred, colored; branchpoint 1.340: preferred, colored; next MAIN 1.341: preferred, colored
Changes since revision 1.340.2.1: +4 -4 lines
Sync with HEAD.

Revision 1.344: download - view: text, markup, annotated - select for diffs
Wed Sep 5 05:36:19 2007 UTC (19 years, 2 months ago) by jnemeth
Branches: MAIN
CVS tags: nick-csl-alignment-base5
Diff to: previous 1.343: preferred, colored
Changes since revision 1.343: +4 -4 lines
yet more caddr_t fallout

Revision 1.305.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:33:28 2007 UTC (19 years, 2 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.305.2.3: preferred, colored
Changes since revision 1.305.2.3: +44 -46 lines
sync with head.

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

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

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

Revision 1.340.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 15 13:48:15 2007 UTC (19 years, 3 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.340: preferred, colored
Changes since revision 1.340: +20 -35 lines
Sync with HEAD.

Revision 1.343.8.2: download - view: text, markup, annotated - select for diffs
Mon Jul 30 06:59:14 2007 UTC (19 years, 3 months ago) by taca
Branches: matt-mips64
Diff to: previous 1.343.8.1: preferred, colored; branchpoint 1.343: preferred, colored; next MAIN 1.344: preferred, colored
Changes since revision 1.343.8.1: +2090 -0 lines
Make it compile with WD_SOFTBADSECT option.

Revision 1.343.8.1
Mon Jul 30 06:59:13 2007 UTC (19 years, 3 months ago) by taca
Branches: matt-mips64
FILE REMOVED
Changes since revision 1.343: +0 -2090 lines
file wd.c was added on branch matt-mips64 on 2007-07-30 06:59:14 +0000

Revision 1.343: download - view: text, markup, annotated - select for diffs
Mon Jul 30 06:59:13 2007 UTC (19 years, 3 months ago) by taca
Branches: MAIN
CVS tags: matt-mips64-base, hpcarm-cleanup
Branch point for: matt-mips64, matt-armv6, jmcneill-pm
Diff to: previous 1.342: preferred, colored
Changes since revision 1.342: +3 -3 lines
Make it compile with WD_SOFTBADSECT option.

Revision 1.342: download - view: text, markup, annotated - select for diffs
Sun Jul 29 12:50:19 2007 UTC (19 years, 3 months ago) by ad
Branches: MAIN
Diff to: previous 1.341: preferred, colored
Changes since revision 1.341: +12 -21 lines
It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.

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

Revision 1.337.2.6: download - view: text, markup, annotated - select for diffs
Sun Jul 15 15:52:42 2007 UTC (19 years, 4 months ago) by ad
Branches: vmlocking
Diff to: previous 1.337.2.5: preferred, colored; branchpoint 1.337: preferred, colored
Changes since revision 1.337.2.5: +20 -5 lines
Sync with head.

Revision 1.337.4.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:05:20 2007 UTC (19 years, 4 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.337: preferred, colored; next MAIN 1.338: preferred, colored
Changes since revision 1.337: +22 -9 lines
Sync with head.

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

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

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

Revision 1.339: download - view: text, markup, annotated - select for diffs
Sun Jul 1 09:48:37 2007 UTC (19 years, 4 months ago) by dsl
Branches: MAIN
Diff to: previous 1.338: preferred, colored
Changes since revision 1.338: +20 -5 lines
Allow callers of the ATAIOCCOMMAND ioctl to request the WDCC_IDENTIFY to
specify a buffer that is less than 512 bytes.

Revision 1.337.2.4: download - view: text, markup, annotated - select for diffs
Sun Jun 17 21:30:54 2007 UTC (19 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.337.2.3: preferred, colored; branchpoint 1.337: preferred, colored
Changes since revision 1.337.2.3: +4 -4 lines
- Increase the number of thread priorities from 128 to 256. How the space
  is set up is to be revisited.
- Implement soft interrupts as kernel threads. A generic implementation
  is provided, with hooks for fast-path MD code that can run the interrupt
  threads over the top of other threads executing in the kernel.
- Split vnode::v_flag into three fields, depending on how the flag is
  locked (by the interlock, by the vnode lock, by the file system).
- Miscellaneous locking fixes and improvements.

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

Revision 1.336.2.2: download - view: text, markup, annotated - select for diffs
Sun Apr 15 16:03:19 2007 UTC (19 years, 7 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.336.2.1: preferred, colored; branchpoint 1.336: preferred, colored; next MAIN 1.337: preferred, colored
Changes since revision 1.336.2.1: +3 -5 lines
sync with head.

Revision 1.337.2.2: download - view: text, markup, annotated - select for diffs
Tue Apr 10 13:24:23 2007 UTC (19 years, 7 months ago) by ad
Branches: vmlocking
Diff to: previous 1.337.2.1: preferred, colored; branchpoint 1.337: preferred, colored
Changes since revision 1.337.2.1: +3 -5 lines
Sync with head.

Revision 1.338: download - view: text, markup, annotated - select for diffs
Sun Apr 8 06:58:47 2007 UTC (19 years, 7 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic
Diff to: previous 1.337: preferred, colored
Changes since revision 1.337: +3 -5 lines
Include opt_ata.h for ATADEBUG definition instead of #defining it
unconditionally.

Revision 1.337.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 13 17:50:27 2007 UTC (19 years, 8 months ago) by ad
Branches: vmlocking
Diff to: previous 1.337: preferred, colored
Changes since revision 1.337: +4 -3 lines
Pull in the initial set of changes for the vmlocking branch.

Revision 1.336.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 12 05:53:08 2007 UTC (19 years, 8 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.336: preferred, colored
Changes since revision 1.336: +6 -6 lines
Sync with HEAD.

Revision 1.337: download - view: text, markup, annotated - select for diffs
Sun Mar 4 06:01:44 2007 UTC (19 years, 8 months ago) by christos
Branches: MAIN
CVS tags: reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Diff to: previous 1.336: preferred, colored
Changes since revision 1.336: +6 -6 lines
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

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

Revision 1.336: download - view: text, markup, annotated - select for diffs
Fri Feb 9 21:55:27 2007 UTC (19 years, 9 months ago) by ad
Branches: MAIN
CVS tags: post-newlock2-merge, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp
Diff to: previous 1.335: preferred, colored
Changes since revision 1.335: +6 -6 lines
Merge newlock2 to head.

Revision 1.329.2.2: download - view: text, markup, annotated - select for diffs
Tue Feb 6 13:11:47 2007 UTC (19 years, 9 months ago) by ad
Branches: newlock2
Diff to: previous 1.329.2.1: preferred, colored; branchpoint 1.329: preferred, colored; next MAIN 1.330: preferred, colored
Changes since revision 1.329.2.1: +6 -6 lines
Quieten noisy boot messages.

Revision 1.305.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:47:54 2006 UTC (19 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.305.2.1: preferred, colored
Changes since revision 1.305.2.1: +79 -3 lines
sync with head.

Revision 1.329.4.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:16:58 2006 UTC (19 years, 11 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.329.4.1: preferred, colored; branchpoint 1.329: preferred, colored; next MAIN 1.330: preferred, colored
Changes since revision 1.329.4.1: +52 -43 lines
sync with head.

Revision 1.274.2.13: download - view: text, markup, annotated - select for diffs
Mon Nov 20 21:47:05 2006 UTC (20 years ago) by tron
Branches: netbsd-2-0
Diff to: previous 1.274.2.12: preferred, colored; branchpoint 1.274: preferred, colored
Changes since revision 1.274.2.12: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #10747):
	sys/dev/ata/wd.c: revision 1.334
Yet another broken seagate drive.

Revision 1.274.2.8.2.6.2.5: download - view: text, markup, annotated - select for diffs
Mon Nov 20 21:47:03 2006 UTC (20 years ago) by tron
Branches: netbsd-2-1
Diff to: previous 1.274.2.8.2.6.2.4: preferred, colored; branchpoint 1.274.2.8.2.6: preferred, colored
Changes since revision 1.274.2.8.2.6.2.4: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #10747):
	sys/dev/ata/wd.c: revision 1.334
Yet another broken seagate drive.

Revision 1.274.2.8.2.11: download - view: text, markup, annotated - select for diffs
Mon Nov 20 21:47:01 2006 UTC (20 years ago) by tron
Branches: netbsd-2
Diff to: previous 1.274.2.8.2.10: preferred, colored; branchpoint 1.274.2.8: preferred, colored
Changes since revision 1.274.2.8.2.10: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #10747):
	sys/dev/ata/wd.c: revision 1.334
Yet another broken seagate drive.

Revision 1.274.2.12: download - view: text, markup, annotated - select for diffs
Mon Nov 20 21:44:06 2006 UTC (20 years ago) by tron
Branches: netbsd-2-0
Diff to: previous 1.274.2.11: preferred, colored; branchpoint 1.274: preferred, colored
Changes since revision 1.274.2.11: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #10746):
	sys/dev/ata/wd.c: revision 1.326
Add yet another broken 160GB seagate drive.  Mine. ST3160021A.

Revision 1.274.2.8.2.6.2.4: download - view: text, markup, annotated - select for diffs
Mon Nov 20 21:44:04 2006 UTC (20 years ago) by tron
Branches: netbsd-2-1
Diff to: previous 1.274.2.8.2.6.2.3: preferred, colored; branchpoint 1.274.2.8.2.6: preferred, colored
Changes since revision 1.274.2.8.2.6.2.3: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #10746):
	sys/dev/ata/wd.c: revision 1.326
Add yet another broken 160GB seagate drive.  Mine. ST3160021A.

Revision 1.274.2.8.2.10: download - view: text, markup, annotated - select for diffs
Mon Nov 20 21:44:01 2006 UTC (20 years ago) by tron
Branches: netbsd-2
Diff to: previous 1.274.2.8.2.9: preferred, colored; branchpoint 1.274.2.8: preferred, colored
Changes since revision 1.274.2.8.2.9: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #10746):
	sys/dev/ata/wd.c: revision 1.326
Add yet another broken 160GB seagate drive.  Mine. ST3160021A.

Revision 1.298.2.13: download - view: text, markup, annotated - select for diffs
Mon Nov 20 15:41:15 2006 UTC (20 years ago) by ghen
Branches: netbsd-3
Diff to: previous 1.298.2.12: preferred, colored; branchpoint 1.298: preferred, colored
Changes since revision 1.298.2.12: +2 -0 lines
Pull up following revision(s) (requested by bouyer in ticket #1583):
	sys/dev/ata/wd.c: revision 1.334
Yet another broken seagate drive.

Revision 1.298.2.12.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 20 15:18:02 2006 UTC (20 years ago) by ghen
Branches: netbsd-3-1
CVS tags: netbsd-3-1-1-RELEASE
Diff to: previous 1.298.2.12: preferred, colored
Changes since revision 1.298.2.12: +2 -0 lines
Pull up following revision(s) (requested by bouyer in ticket #1583):
	sys/dev/ata/wd.c: revision 1.334
Yet another broken seagate drive.

Revision 1.298.2.7.2.6: download - view: text, markup, annotated - select for diffs
Mon Nov 20 14:56:09 2006 UTC (20 years ago) by ghen
Branches: netbsd-3-0
CVS tags: netbsd-3-0-3-RELEASE
Diff to: previous 1.298.2.7.2.5: preferred, colored; branchpoint 1.298.2.7: preferred, colored
Changes since revision 1.298.2.7.2.5: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #1583):
	sys/dev/ata/wd.c: revision 1.334
Yet another broken seagate drive.

Revision 1.298.2.7.2.5: download - view: text, markup, annotated - select for diffs
Mon Nov 20 14:52:14 2006 UTC (20 years ago) by ghen
Branches: netbsd-3-0
Diff to: previous 1.298.2.7.2.4: preferred, colored; branchpoint 1.298.2.7: preferred, colored
Changes since revision 1.298.2.7.2.4: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #1582):
	sys/dev/ata/wd.c: revision 1.326
Add yet another broken 160GB seagate drive.  Mine. ST3160021A.

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

Revision 1.335: download - view: text, markup, annotated - select for diffs
Thu Nov 16 01:32:48 2006 UTC (20 years ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RC1
Branch point for: wrstuden-fixsa, netbsd-4
Diff to: previous 1.334: preferred, colored
Changes since revision 1.334: +11 -11 lines
__unused removal on arguments; approved by core.

Revision 1.334: download - view: text, markup, annotated - select for diffs
Thu Nov 9 19:43:05 2006 UTC (20 years ago) by bouyer
Branches: MAIN
Diff to: previous 1.333: preferred, colored
Changes since revision 1.333: +4 -2 lines
Yet another broken seagate drive.

Revision 1.333: download - view: text, markup, annotated - select for diffs
Thu Oct 26 05:04:18 2006 UTC (20 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.332: preferred, colored
Changes since revision 1.332: +25 -32 lines
Use the new prop_dictionary_util functions.

Revision 1.332: download - view: text, markup, annotated - select for diffs
Wed Oct 25 04:04:45 2006 UTC (20 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.331: preferred, colored
Changes since revision 1.331: +18 -4 lines
- Add a new disk ioctl (DIOCGDISKINFO) to get the disk-info dictionary
  for the disk.
- Add a new function, disk_ioctl(), that does generic disk ioctl handling.
  DIOCGDISKINFO is handled here now, and others will be added in the future.
- In the wd driver, fill in the dk_info member of struct disk and use the
  new disk_ioctl() function.

Revision 1.329.4.1: download - view: text, markup, annotated - select for diffs
Sun Oct 22 06:05:32 2006 UTC (20 years ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.329: preferred, colored
Changes since revision 1.329: +67 -11 lines
sync with head

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

Revision 1.330: download - view: text, markup, annotated - select for diffs
Fri Sep 22 04:48:38 2006 UTC (20 years, 1 month ago) by thorpej
Branches: MAIN
Diff to: previous 1.329: preferred, colored
Changes since revision 1.329: +59 -3 lines
- Define disk information, disk geometry, and disk partition dictionary
  schemas.  Disk information and disk geometry are designed to replace
  information currently conveyed to user space using struct disklabel.
- Add a dk_info member to struct disk; a reference to a disk information
  dictionary.  This dictionary is to be allocated and the reference stored
  in struct disk by individual drivers.
- disk_detach0() will release dk_info if non-NULL.
- Convert the wd(4) driver to stash geometry and other disk properties
  as the "disk-info" property in its properties dictionary.  This needs
  some cleanup, but will serve as an example of what to do with other
  disk drivers.

Revision 1.318.2.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 02:49:44 2006 UTC (20 years, 2 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.318: preferred, colored; next MAIN 1.319: preferred, colored
Changes since revision 1.318: +24 -12 lines
sync with head

Revision 1.329: download - view: text, markup, annotated - select for diffs
Sun Aug 27 23:51:31 2006 UTC (20 years, 2 months ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Diff to: previous 1.328: preferred, colored
Changes since revision 1.328: +2 -10 lines
Oops, this is not ready yet.

Revision 1.328: download - view: text, markup, annotated - select for diffs
Sun Aug 27 23:50:53 2006 UTC (20 years, 2 months ago) by christos
Branches: MAIN
Diff to: previous 1.327: preferred, colored
Changes since revision 1.327: +10 -2 lines
Add missing initializer

Revision 1.320.2.4: download - view: text, markup, annotated - select for diffs
Fri Aug 11 15:43:59 2006 UTC (20 years, 3 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.320.2.3: preferred, colored; branchpoint 1.320: preferred, colored; next MAIN 1.321: preferred, colored
Changes since revision 1.320.2.3: +11 -2 lines
sync with head

Revision 1.274.2.8.2.9: download - view: text, markup, annotated - select for diffs
Sun Aug 6 20:16:53 2006 UTC (20 years, 3 months ago) by tron
Branches: netbsd-2
Diff to: previous 1.274.2.8.2.8: preferred, colored; branchpoint 1.274.2.8: preferred, colored
Changes since revision 1.274.2.8.2.8: +4 -4 lines
Pull up following revision(s) (requested by bouyer in ticket #10644):
	sys/dev/ata/wd.c: revision 1.325 via patch
Adjust quirk entry for seagate drives. Should fix kern/33637 by Shigeya
Suzuki.

Revision 1.274.2.8.2.6.2.3: download - view: text, markup, annotated - select for diffs
Sun Aug 6 20:15:55 2006 UTC (20 years, 3 months ago) by tron
Branches: netbsd-2-1
Diff to: previous 1.274.2.8.2.6.2.2: preferred, colored; branchpoint 1.274.2.8.2.6: preferred, colored
Changes since revision 1.274.2.8.2.6.2.2: +4 -4 lines
Pull up following revision(s) (requested by bouyer in ticket #10644):
	sys/dev/ata/wd.c: revision 1.325 via patch
Adjust quirk entry for seagate drives. Should fix kern/33637 by Shigeya
Suzuki.

Revision 1.274.2.11: download - view: text, markup, annotated - select for diffs
Sun Aug 6 20:11:23 2006 UTC (20 years, 3 months ago) by tron
Branches: netbsd-2-0
Diff to: previous 1.274.2.10: preferred, colored; branchpoint 1.274: preferred, colored
Changes since revision 1.274.2.10: +6 -6 lines
Pull up following revision(s) (requested by bouyer in ticket #10644):
	sys/dev/ata/wd.c: revision 1.325 via patch
Adjust quirk entry for seagate drives. Should fix kern/33637 by Shigeya
Suzuki.

Revision 1.327: download - view: text, markup, annotated - select for diffs
Tue Aug 1 07:19:07 2006 UTC (20 years, 3 months ago) by lukem
Branches: MAIN
CVS tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Diff to: previous 1.326: preferred, colored
Changes since revision 1.326: +11 -2 lines
If there's any wd quirks in use, display them.

Revision 1.325.2.1: download - view: text, markup, annotated - select for diffs
Thu Jul 13 17:49:22 2006 UTC (20 years, 4 months ago) by gdamore
Branches: gdamore-uart
Diff to: previous 1.325: preferred, colored; next MAIN 1.326: preferred, colored
Changes since revision 1.325: +4 -2 lines
Merge from HEAD.

Revision 1.298.2.12: download - view: text, markup, annotated - select for diffs
Fri Jun 30 15:52:17 2006 UTC (20 years, 4 months ago) by ghen
Branches: netbsd-3
CVS tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1
Branch point for: netbsd-3-1
Diff to: previous 1.298.2.11: preferred, colored; branchpoint 1.298: preferred, colored
Changes since revision 1.298.2.11: +4 -2 lines
Pull up following revision(s) (requested by gendalia in ticket #1396):
	sys/dev/ata/wd.c: revision 1.326
Add yet another broken 160GB seagate drive.  Mine. ST3160021A.

Revision 1.320.2.3: download - view: text, markup, annotated - select for diffs
Mon Jun 26 12:50:37 2006 UTC (20 years, 4 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.320.2.2: preferred, colored; branchpoint 1.320: preferred, colored
Changes since revision 1.320.2.2: +5 -3 lines
sync with head.

Revision 1.326: download - view: text, markup, annotated - select for diffs
Sat Jun 24 04:49:40 2006 UTC (20 years, 4 months ago) by gendalia
Branches: MAIN
CVS tags: yamt-pdpolicy-base6
Diff to: previous 1.325: preferred, colored
Changes since revision 1.325: +4 -2 lines
Add yet another broken 160GB seagate drive.  Mine. ST3160021A.

Revision 1.305.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 15:02:45 2006 UTC (20 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.305: preferred, colored
Changes since revision 1.305: +129 -95 lines
sync with head.

Revision 1.324.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 19 03:58:12 2006 UTC (20 years, 5 months ago) by chap
Branches: chap-midi
Diff to: previous 1.324: preferred, colored; next MAIN 1.325: preferred, colored
Changes since revision 1.324: +3 -3 lines
Sync with head.

Revision 1.298.2.7.2.4: download - view: text, markup, annotated - select for diffs
Mon Jun 12 12:59:18 2006 UTC (20 years, 5 months ago) by tron
Branches: netbsd-3-0
CVS tags: netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE
Diff to: previous 1.298.2.7.2.3: preferred, colored; branchpoint 1.298.2.7: preferred, colored
Changes since revision 1.298.2.7.2.3: +4 -4 lines
Pull up following revision(s) (requested by bouyer in ticket #1375):
	sys/dev/ata/wd.c: revision 1.325 via patch
Adjust quirk entry for seagate drives. Should fix kern/33637 by Shigeya
Suzuki.

Revision 1.298.2.11: download - view: text, markup, annotated - select for diffs
Mon Jun 12 12:59:15 2006 UTC (20 years, 5 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.298.2.10: preferred, colored; branchpoint 1.298: preferred, colored
Changes since revision 1.298.2.10: +4 -4 lines
Pull up following revision(s) (requested by bouyer in ticket #1375):
	sys/dev/ata/wd.c: revision 1.325 via patch
Adjust quirk entry for seagate drives. Should fix kern/33637 by Shigeya
Suzuki.

Revision 1.318.4.3: download - view: text, markup, annotated - select for diffs
Wed Jun 7 15:51:08 2006 UTC (20 years, 5 months ago) by kardel
Branches: simonb-timecounters
Diff to: previous 1.318.4.2: preferred, colored; next MAIN 1.319: preferred, colored
Changes since revision 1.318.4.2: +3 -3 lines
Sync with head.

Revision 1.325: download - view: text, markup, annotated - select for diffs
Mon Jun 5 18:22:23 2006 UTC (20 years, 5 months ago) by bouyer
Branches: MAIN
CVS tags: simonb-timecounters-base, gdamore-uart-base, chap-midi-nbase, chap-midi-base
Branch point for: gdamore-uart
Diff to: previous 1.324: preferred, colored
Changes since revision 1.324: +3 -3 lines
Adjust quirk entry for seagate drives. Should fix kern/33637 by Shigeya
Suzuki.

Revision 1.318.4.2: download - view: text, markup, annotated - select for diffs
Thu Jun 1 22:36:19 2006 UTC (20 years, 5 months ago) by kardel
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.318.4.1: preferred, colored
Changes since revision 1.318.4.1: +4 -2 lines
Sync with head.

Revision 1.320.6.2: download - view: text, markup, annotated - select for diffs
Wed May 24 15:50:07 2006 UTC (20 years, 5 months ago) by tron
Branches: peter-altq
Diff to: previous 1.320.6.1: preferred, colored; branchpoint 1.320: preferred, colored; next MAIN 1.321: preferred, colored
Changes since revision 1.320.6.1: +2 -0 lines
Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.320.2.2: download - view: text, markup, annotated - select for diffs
Wed May 24 10:57:36 2006 UTC (20 years, 5 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.320.2.1: preferred, colored; branchpoint 1.320: preferred, colored
Changes since revision 1.320.2.1: +4 -2 lines
sync with head.

Revision 1.274.2.10: download - view: text, markup, annotated - select for diffs
Wed May 24 02:31:33 2006 UTC (20 years, 5 months ago) by riz
Branches: netbsd-2-0
Diff to: previous 1.274.2.9: preferred, colored; branchpoint 1.274: preferred, colored
Changes since revision 1.274.2.9: +6 -4 lines
Pull up following revision(s) (requested by bouyer in ticket #10625):
	sys/dev/ata/wd.c: revision 1.324 via patch
Add yet another broken 160Gb seagate drive. I though we had found all of
them ... reported by Damian Lubosch on current-users.

Revision 1.274.2.8.2.6.2.2: download - view: text, markup, annotated - select for diffs
Wed May 24 02:29:11 2006 UTC (20 years, 5 months ago) by riz
Branches: netbsd-2-1
Diff to: previous 1.274.2.8.2.6.2.1: preferred, colored; branchpoint 1.274.2.8.2.6: preferred, colored
Changes since revision 1.274.2.8.2.6.2.1: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #10625):
	sys/dev/ata/wd.c: revision 1.324
Add yet another broken 160Gb seagate drive. I though we had found all of
them ... reported by Damian Lubosch on current-users.

Revision 1.274.2.8.2.8: download - view: text, markup, annotated - select for diffs
Wed May 24 02:29:05 2006 UTC (20 years, 5 months ago) by riz
Branches: netbsd-2
Diff to: previous 1.274.2.8.2.7: preferred, colored; branchpoint 1.274.2.8: preferred, colored
Changes since revision 1.274.2.8.2.7: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #10625):
	sys/dev/ata/wd.c: revision 1.324
Add yet another broken 160Gb seagate drive. I though we had found all of
them ... reported by Damian Lubosch on current-users.

Revision 1.298.2.7.2.3: download - view: text, markup, annotated - select for diffs
Wed May 24 02:15:21 2006 UTC (20 years, 5 months ago) by riz
Branches: netbsd-3-0
Diff to: previous 1.298.2.7.2.2: preferred, colored; branchpoint 1.298.2.7: preferred, colored
Changes since revision 1.298.2.7.2.2: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #1337):
	sys/dev/ata/wd.c: revision 1.324
Add yet another broken 160Gb seagate drive. I though we had found all of
them ... reported by Damian Lubosch on current-users.

Revision 1.298.2.10: download - view: text, markup, annotated - select for diffs
Wed May 24 02:12:27 2006 UTC (20 years, 5 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.298.2.9: preferred, colored; branchpoint 1.298: preferred, colored
Changes since revision 1.298.2.9: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #1337):
	sys/dev/ata/wd.c: revision 1.324
Add yet another broken 160Gb seagate drive. I though we had found all of
them ... reported by Damian Lubosch on current-users.

Revision 1.324: download - view: text, markup, annotated - select for diffs
Thu May 18 19:42:09 2006 UTC (20 years, 6 months ago) by bouyer
Branches: MAIN
CVS tags: yamt-pdpolicy-base5
Branch point for: chap-midi
Diff to: previous 1.323: preferred, colored
Changes since revision 1.323: +4 -2 lines
Add yet another broken 160Gb seagate drive. I though we had found all of
them ... reported by Damian Lubosch on current-users.

Revision 1.318.4.1: download - view: text, markup, annotated - select for diffs
Sat Apr 22 11:38:51 2006 UTC (20 years, 6 months ago) by simonb
Branches: simonb-timecounters
Diff to: previous 1.318: preferred, colored
Changes since revision 1.318: +10 -11 lines
Sync with head.

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

Revision 1.323: download - view: text, markup, annotated - select for diffs
Wed Apr 5 02:40:57 2006 UTC (20 years, 7 months ago) by cherry
Branches: MAIN
CVS tags: yamt-pdpolicy-base4, elad-kernelauth-base
Diff to: previous 1.322: preferred, colored
Changes since revision 1.322: +0 -1 lines
Backing out previous commit for more review.

Revision 1.322: download - view: text, markup, annotated - select for diffs
Tue Apr 4 07:11:45 2006 UTC (20 years, 7 months ago) by cherry
Branches: MAIN
Diff to: previous 1.321: preferred, colored
Changes since revision 1.321: +3 -2 lines
Sleeps hard disk just before system shutdown.
Some hardware (eg: Apple iBooks) don't do this automatically
and the harddisk behaves as if the power plug were pulled.

Closes PR: kern/32766

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

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

Revision 1.274.2.9: download - view: text, markup, annotated - select for diffs
Tue Mar 28 23:19:01 2006 UTC (20 years, 7 months ago) by riz
Branches: netbsd-2-0
Diff to: previous 1.274.2.8: preferred, colored; branchpoint 1.274: preferred, colored
Changes since revision 1.274.2.8: +9 -5 lines
Pull up patch (requested by bouyer in ticket #10397):
sync the list of quirky seagate drives with -current

Revision 1.274.2.8.2.6.2.1: download - view: text, markup, annotated - select for diffs
Tue Mar 28 23:11:30 2006 UTC (20 years, 7 months ago) by riz
Branches: netbsd-2-1
Diff to: previous 1.274.2.8.2.6: preferred, colored
Changes since revision 1.274.2.8.2.6: +5 -9 lines
Pull up following revision(s) (requested by bouyer in ticket #10396):
	sys/dev/ata/wd.c: revision 1.310
Use a pmatch(9) expression which should catch all present and future
seagate drives larger than 200GB for the WD_QUIRK_FORCE_LBA48 quirks.
Based on infos from
http://www.seagate.com/support/kb/disc/howto/interpret_model.html

Revision 1.274.2.8.2.7: download - view: text, markup, annotated - select for diffs
Tue Mar 28 23:11:26 2006 UTC (20 years, 7 months ago) by riz
Branches: netbsd-2
Diff to: previous 1.274.2.8.2.6: preferred, colored; branchpoint 1.274.2.8: preferred, colored
Changes since revision 1.274.2.8.2.6: +5 -9 lines
Pull up following revision(s) (requested by bouyer in ticket #10396):
	sys/dev/ata/wd.c: revision 1.310
Use a pmatch(9) expression which should catch all present and future
seagate drives larger than 200GB for the WD_QUIRK_FORCE_LBA48 quirks.
Based on infos from
http://www.seagate.com/support/kb/disc/howto/interpret_model.html

Revision 1.298.2.9: download - view: text, markup, annotated - select for diffs
Tue Mar 28 22:53:48 2006 UTC (20 years, 7 months ago) by riz
Branches: netbsd-3
Diff to: previous 1.298.2.8: preferred, colored; branchpoint 1.298: preferred, colored
Changes since revision 1.298.2.8: +5 -9 lines
Pull up following revision(s) (requested by bouyer in ticket #1227):
	sys/dev/ata/wd.c: revision 1.310
Use a pmatch(9) expression which should catch all present and future
seagate drives larger than 200GB for the WD_QUIRK_FORCE_LBA48 quirks.
Based on infos from
http://www.seagate.com/support/kb/disc/howto/interpret_model.html

Revision 1.298.2.7.2.2: download - view: text, markup, annotated - select for diffs
Tue Mar 28 22:53:44 2006 UTC (20 years, 7 months ago) by riz
Branches: netbsd-3-0
Diff to: previous 1.298.2.7.2.1: preferred, colored; branchpoint 1.298.2.7: preferred, colored
Changes since revision 1.298.2.7.2.1: +5 -9 lines
Pull up following revision(s) (requested by bouyer in ticket #1227):
	sys/dev/ata/wd.c: revision 1.310
Use a pmatch(9) expression which should catch all present and future
seagate drives larger than 200GB for the WD_QUIRK_FORCE_LBA48 quirks.
Based on infos from
http://www.seagate.com/support/kb/disc/howto/interpret_model.html

Revision 1.321: download - view: text, markup, annotated - select for diffs
Tue Mar 28 17:38:29 2006 UTC (20 years, 7 months ago) by thorpej
Branches: MAIN
CVS tags: yamt-pdpolicy-base3
Diff to: previous 1.320: preferred, colored
Changes since revision 1.320: +7 -6 lines
Use device_unit().

Revision 1.320: download - view: text, markup, annotated - select for diffs
Wed Mar 1 12:38:13 2006 UTC (20 years, 8 months ago) by yamt
Branches: MAIN
CVS tags: yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Diff to: previous 1.319: preferred, colored
Changes since revision 1.319: +4 -6 lines
merge yamt-uio_vmspace branch.

- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.

Revision 1.315.2.4: download - view: text, markup, annotated - select for diffs
Wed Mar 1 09:28:11 2006 UTC (20 years, 8 months ago) by yamt
Branches: yamt-uio_vmspace
Diff to: previous 1.315.2.3: preferred, colored; next MAIN 1.316: preferred, colored
Changes since revision 1.315.2.3: +3 -3 lines
sync with head.

Revision 1.319: download - view: text, markup, annotated - select for diffs
Mon Feb 20 16:50:36 2006 UTC (20 years, 8 months ago) by thorpej
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5
Diff to: previous 1.318: preferred, colored
Changes since revision 1.318: +3 -3 lines
Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.

Revision 1.315.2.3: download - view: text, markup, annotated - select for diffs
Sun Feb 5 11:34:49 2006 UTC (20 years, 9 months ago) by yamt
Branches: yamt-uio_vmspace
Diff to: previous 1.315.2.2: preferred, colored
Changes since revision 1.315.2.2: +4 -6 lines
adapt wd.

Revision 1.315.2.2: download - view: text, markup, annotated - select for diffs
Wed Feb 1 14:52:08 2006 UTC (20 years, 9 months ago) by yamt
Branches: yamt-uio_vmspace
Diff to: previous 1.315.2.1: preferred, colored
Changes since revision 1.315.2.1: +3 -3 lines
sync with head.

Revision 1.298.2.7.2.1: download - view: text, markup, annotated - select for diffs
Fri Jan 27 22:55:25 2006 UTC (20 years, 9 months ago) by tron
Branches: netbsd-3-0
Diff to: previous 1.298.2.7: preferred, colored
Changes since revision 1.298.2.7: +3 -3 lines
Pull up following revision(s) (requested by abs in ticket #1132):
	sys/dev/ata/wd.c: revision 1.318
cast 16bit atap_capacity to u_int64_t before << 16. (assigned to
a u_int64_t variable). Fixes 1 to 2 TB disks in qemu. Tested with
1=0000GB and to a lesser extent 2047GB sparse files. For reference
an empty FFS1 filesystem on a 1200GB sparse file uses 19GB of disk.

Revision 1.298.2.8: download - view: text, markup, annotated - select for diffs
Fri Jan 27 22:53:45 2006 UTC (20 years, 9 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.298.2.7: preferred, colored; branchpoint 1.298: preferred, colored
Changes since revision 1.298.2.7: +3 -3 lines
Pull up following revision(s) (requested by abs in ticket #1132):
	sys/dev/ata/wd.c: revision 1.318
cast 16bit atap_capacity to u_int64_t before << 16. (assigned to
a u_int64_t variable). Fixes 1 to 2 TB disks in qemu. Tested with
1=0000GB and to a lesser extent 2047GB sparse files. For reference
an empty FFS1 filesystem on a 1200GB sparse file uses 19GB of disk.

Revision 1.318: download - view: text, markup, annotated - select for diffs
Sun Jan 15 19:51:06 2006 UTC (20 years, 10 months ago) by abs
Branches: MAIN
Branch point for: simonb-timecounters, rpaulo-netinet-merge-pcb
Diff to: previous 1.317: preferred, colored
Changes since revision 1.317: +3 -3 lines
cast 16bit atap_capacity to u_int64_t before << 16. (assigned to
a u_int64_t variable). Fixes 1 to 2 TB disks in qemu. Tested with
1200GB and to a lesser extent 2047GB sparse files. For reference
an empty FFS1 filesystem on a 1200GB sparse file uses 19GB of disk.

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

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

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

Revision 1.315: download - view: text, markup, annotated - select for diffs
Mon Dec 26 10:36:47 2005 UTC (20 years, 10 months ago) by yamt
Branches: MAIN
Branch point for: yamt-uio_vmspace
Diff to: previous 1.314: preferred, colored
Changes since revision 1.314: +43 -2 lines
- add ioctls to set/get disk bufq strategy.
- implement them for some drivers.

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

Revision 1.257.2.14: download - view: text, markup, annotated - select for diffs
Thu Nov 10 14:03:54 2005 UTC (21 years ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.257.2.13: preferred, colored; next MAIN 1.258: preferred, colored
Changes since revision 1.257.2.13: +82 -83 lines
Sync with HEAD. Here we go again...

Revision 1.312.2.1: download - view: text, markup, annotated - select for diffs
Wed Nov 2 11:57:56 2005 UTC (21 years ago) by yamt
Branches: yamt-vop
Diff to: previous 1.312: preferred, colored; next MAIN 1.313: preferred, colored
Changes since revision 1.312: +4 -3 lines
sync with head.

Revision 1.313: download - view: text, markup, annotated - select for diffs
Tue Nov 1 20:44:04 2005 UTC (21 years ago) by martin
Branches: MAIN
CVS tags: yamt-vop-base3, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, ktrace-lwp-base
Diff to: previous 1.312: preferred, colored
Changes since revision 1.312: +4 -3 lines
Rework the funny "user_strat: No ioctl" error messages - the functions
have not been called user_strat for quite some time and the message is
confusing if you do not know the code.

Revision 1.312: download - view: text, markup, annotated - select for diffs
Sat Oct 15 17:29:12 2005 UTC (21 years, 1 month ago) by yamt
Branches: MAIN
CVS tags: yamt-vop-base2, yamt-vop-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-vop
Diff to: previous 1.311: preferred, colored
Changes since revision 1.311: +7 -7 lines
- change the way to specify a bufq strategy.  (by string rather than by number)
- rather than embedding bufq_state in driver softc,
  have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
  from sys/bufq.h to sys/bufq_impl.h.
  (is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c.  (not tested)

Revision 1.298.2.7: download - view: text, markup, annotated - select for diffs
Thu Sep 8 21:18:34 2005 UTC (21 years, 2 months ago) by tron
Branches: netbsd-3
CVS tags: netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1
Branch point for: netbsd-3-0
Diff to: previous 1.298.2.6: preferred, colored; branchpoint 1.298: preferred, colored
Changes since revision 1.298.2.6: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #750):
	sys/dev/ata/wd.c: revision 1.309
Add quirk for ST3200826A. From rudolf (netbsd at eq.cz) on tech-kern.

Revision 1.298.2.6: download - view: text, markup, annotated - select for diffs
Thu Sep 8 21:17:03 2005 UTC (21 years, 2 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.298.2.5: preferred, colored; branchpoint 1.298: preferred, colored
Changes since revision 1.298.2.5: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #749):
	sys/dev/ata/wd.c: revision 1.307
ST3300831A also needs WD_QUIRK_FORCE_LBA48.

Revision 1.274.2.8.2.6: download - view: text, markup, annotated - select for diffs
Tue Sep 6 16:28:33 2005 UTC (21 years, 2 months ago) by riz
Branches: netbsd-2
CVS tags: netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4
Branch point for: netbsd-2-1
Diff to: previous 1.274.2.8.2.5: preferred, colored; branchpoint 1.274.2.8: preferred, colored
Changes since revision 1.274.2.8.2.5: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #5822):
	sys/dev/ata/wd.c: revision 1.309
Add quirk for ST3200826A. From rudolf (netbsd at eq.cz) on tech-kern.

Revision 1.274.2.8.2.5: download - view: text, markup, annotated - select for diffs
Tue Sep 6 16:24:45 2005 UTC (21 years, 2 months ago) by riz
Branches: netbsd-2
Diff to: previous 1.274.2.8.2.4: preferred, colored; branchpoint 1.274.2.8: preferred, colored
Changes since revision 1.274.2.8.2.4: +4 -2 lines
Pull up following revision(s) (requested by bouyer in ticket #5821):
	sys/dev/ata/wd.c: revision 1.307
ST3300831A also needs WD_QUIRK_FORCE_LBA48.

Revision 1.311: download - view: text, markup, annotated - select for diffs
Mon Sep 5 22:55:31 2005 UTC (21 years, 2 months ago) by riz
Branches: MAIN
Diff to: previous 1.310: preferred, colored
Changes since revision 1.310: +3 -3 lines
Fix typo in comment from previous revision.

Revision 1.310: download - view: text, markup, annotated - select for diffs
Mon Sep 5 21:09:08 2005 UTC (21 years, 2 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.309: preferred, colored
Changes since revision 1.309: +4 -10 lines
Use a pmatch(9) expression which should catch all present and future
seagate drives larger than 200GB for the WD_QUIRK_FORCE_LBA48 quirks.
Based on infos from
http://www.seagate.com/support/kb/disc/howto/interpret_model.html

Revision 1.309: download - view: text, markup, annotated - select for diffs
Mon Sep 5 20:42:37 2005 UTC (21 years, 2 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.308: preferred, colored
Changes since revision 1.308: +4 -2 lines
Add quirk for ST3200826A. From rudolf (netbsd at eq.cz) on tech-kern.

Revision 1.308: download - view: text, markup, annotated - select for diffs
Mon Aug 29 19:05:54 2005 UTC (21 years, 2 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.307: preferred, colored
Changes since revision 1.307: +55 -65 lines
wd->atabus->ata_bio() should handle the multi-sector PIO transfers just fine,
and in a better way than what is done in wddump() (which also does it
for DMA transfers, limiting the dump speed significantly). So remove
code splitting transfers in wd->sc_multi chunks from wddump(), and call
wd->atabus->ata_bio() with the whole transfers.

Problem reported by Frank Kardel, and patch tested by him.

Revision 1.307: download - view: text, markup, annotated - select for diffs
Fri Aug 26 00:09:03 2005 UTC (21 years, 2 months ago) by briggs
Branches: MAIN
Diff to: previous 1.306: preferred, colored
Changes since revision 1.306: +4 -2 lines
ST3300831A also needs WD_QUIRK_FORCE_LBA48.

Revision 1.306: download - view: text, markup, annotated - select for diffs
Thu Aug 25 19:06:35 2005 UTC (21 years, 2 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.305: preferred, colored
Changes since revision 1.305: +7 -3 lines
Add a comment explaining why we have WD_QUIRK_FORCE_LBA48, instead of always
using LBA48 for sector 0xffffff.

Revision 1.274.2.8.2.4: download - view: text, markup, annotated - select for diffs
Tue Jul 5 19:13:07 2005 UTC (21 years, 4 months ago) by riz
Branches: netbsd-2
CVS tags: netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1
Diff to: previous 1.274.2.8.2.3: preferred, colored; branchpoint 1.274.2.8: preferred, colored
Changes since revision 1.274.2.8.2.3: +4 -2 lines
Pull up revision 1.304 (requested by bouyer in ticket #2028):
The ST3160023A* also need the LBA48 quirk. From Timo Schoeler.

Revision 1.274.2.8.2.3: download - view: text, markup, annotated - select for diffs
Tue Jul 5 19:11:05 2005 UTC (21 years, 4 months ago) by riz
Branches: netbsd-2
Diff to: previous 1.274.2.8.2.2: preferred, colored; branchpoint 1.274.2.8: preferred, colored
Changes since revision 1.274.2.8.2.2: +4 -4 lines
Pull up revision 1.303 via patch (requested by bouyer in ticket #2027):
Use pmatch() metacharacters to match both SATA and PATA versions of seagate
drives in the quirk table.

Revision 1.298.2.5: download - view: text, markup, annotated - select for diffs
Sat Jul 2 18:12:36 2005 UTC (21 years, 4 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.298.2.4: preferred, colored; branchpoint 1.298: preferred, colored
Changes since revision 1.298.2.4: +4 -2 lines
Pull up revision 1.304 (requested by bouyer in ticket #497):
The ST3160023A* also need the LBA48 quirk. From Timo Schoeler.

Revision 1.298.2.4: download - view: text, markup, annotated - select for diffs
Sat Jul 2 18:09:12 2005 UTC (21 years, 4 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.298.2.3: preferred, colored; branchpoint 1.298: preferred, colored
Changes since revision 1.298.2.3: +2 -4 lines
Pull up revision 1.303 (requested by bouyer in ticket #496):
Use pmatch() metacharacters to match both SATA and PATA versions of seagate
drives in the quirk table.

Revision 1.305: download - view: text, markup, annotated - select for diffs
Sat Jul 2 04:29:01 2005 UTC (21 years, 4 months ago) by dsainty
Branches: MAIN
Branch point for: yamt-lazymbuf
Diff to: previous 1.304: preferred, colored
Changes since revision 1.304: +4 -2 lines
Force LBA48 access to ST3160827AS drives.  Without this change the entire
system hangs whenever a read or write request to sector 0xfffffff occurs.

The hang appears to happen when:

status = bus_space_read_1(wdr->cmd_iot, wdr->cmd_iohs[wd_status], 0);

is executed in __wdcwait(), and it is not possible to enter the debugger or
make the system respond at all after this point.

Whilst not necessarily the most prudent solution to handling the large number
of drives that exhibit this problem, it is currently the popular workaround.

[An alternative approach is to just always drop to LBA48 if the request
happens to pass by sector 0xfffffff and the drive reported as larger than
0xfffffff sectors.  My understanding is that the 32 bit addressing below
0x10000000 is purely there as a performance booster, not to resolve a
compatibility issue.]

Revision 1.304: download - view: text, markup, annotated - select for diffs
Sun Jun 19 18:26:40 2005 UTC (21 years, 5 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.303: preferred, colored
Changes since revision 1.303: +4 -2 lines
The ST3160023A* also need the LBA48 quirk. From Timo Schoeler.

Revision 1.303: download - view: text, markup, annotated - select for diffs
Thu Jun 16 20:03:35 2005 UTC (21 years, 5 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.302: preferred, colored
Changes since revision 1.302: +4 -6 lines
Use pmatch() metacharacters to match both SATA and PATA versions of seagate
drives in the quirk table.

Revision 1.298.2.3: download - view: text, markup, annotated - select for diffs
Thu Jun 16 09:37:09 2005 UTC (21 years, 5 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.298.2.2: preferred, colored; branchpoint 1.298: preferred, colored
Changes since revision 1.298.2.2: +2 -0 lines
Pull up revision 1.302 (requested by martti in ticket #459):
Added LBA48 quirk for Seagate ST3200822AS. Tested by Teemu Rinta-aho.

Revision 1.302: download - view: text, markup, annotated - select for diffs
Thu Jun 16 05:47:17 2005 UTC (21 years, 5 months ago) by martti
Branches: MAIN
Diff to: previous 1.301: preferred, colored
Changes since revision 1.301: +4 -2 lines
Added LBA48 quirk for Seagate ST3200822AS. Tested by Teemu Rinta-aho.

Revision 1.301: download - view: text, markup, annotated - select for diffs
Sun May 29 22:11:28 2005 UTC (21 years, 5 months ago) by christos
Branches: MAIN
Diff to: previous 1.300: preferred, colored
Changes since revision 1.300: +11 -11 lines
- remove casts [to avoid volatile]
- sprinkle const
- avoid shadowed variables

Revision 1.298.2.2: download - view: text, markup, annotated - select for diffs
Thu May 19 16:17:00 2005 UTC (21 years, 6 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.298.2.1: preferred, colored; branchpoint 1.298: preferred, colored
Changes since revision 1.298.2.1: +2 -0 lines
Pull up revision 1.300 (requested by bouyer in ticket #310):
Add another broken seagate device to the quirk list.
Problem reported by rudolf <netbsd at eq.cz> on netbsd-help@

Revision 1.274.2.8.2.2: download - view: text, markup, annotated - select for diffs
Mon May 16 16:15:10 2005 UTC (21 years, 6 months ago) by riz
Branches: netbsd-2
Diff to: previous 1.274.2.8.2.1: preferred, colored; branchpoint 1.274.2.8: preferred, colored
Changes since revision 1.274.2.8.2.1: +4 -2 lines
Pull up revision 1.300 (requested by bouyer in ticket #1522):
Add another broken seagate device to the quirk list.
Problem reported by rudolf <netbsd at eq.cz> on netbsd-help@

Revision 1.300: download - view: text, markup, annotated - select for diffs
Mon May 16 15:36:57 2005 UTC (21 years, 6 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.299: preferred, colored
Changes since revision 1.299: +4 -2 lines
Add another broken seagate device to the quirk list.
Problem reported by rudolf <netbsd at eq.cz> on netbsd-help@

Revision 1.297.4.1: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:28:45 2005 UTC (21 years, 6 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.297: preferred, colored; next MAIN 1.298: preferred, colored
Changes since revision 1.297: +4 -10 lines
sync with -current

Revision 1.298.2.1: download - view: text, markup, annotated - select for diffs
Wed Apr 6 11:57:20 2005 UTC (21 years, 7 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.298: preferred, colored
Changes since revision 1.298: +3 -9 lines
Pull up revision 1.299 (requested by yamt in ticket #112):
introduce a function to drain bufq and use it where appropriate.

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

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

Revision 1.297.6.1: download - view: text, markup, annotated - select for diffs
Sat Mar 19 08:33:55 2005 UTC (21 years, 8 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.297: preferred, colored; next MAIN 1.298: preferred, colored
Changes since revision 1.297: +3 -3 lines
sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.257.2.12: download - view: text, markup, annotated - select for diffs
Wed Mar 9 08:23:06 2005 UTC (21 years, 8 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.257.2.11: preferred, colored
Changes since revision 1.257.2.11: +3 -3 lines
Adapt commented out code to branch.

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

Hi Perry!

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

Revision 1.274.2.8.2.1: download - view: text, markup, annotated - select for diffs
Sun Feb 6 08:33:23 2005 UTC (21 years, 9 months ago) by jmc
Branches: netbsd-2
Diff to: previous 1.274.2.8: preferred, colored
Changes since revision 1.274.2.8: +9 -3 lines
Pullup rev 1.297 (requested by bouyer in ticket #986)

	Some drives reports ATA version < 4, and still support (and need) the
WDCC_FLUSHCACHE command. So for drive < ATA4, test WDC_CMD2_FC in atap_cmd_set2
before returning ENODEV.

Revision 1.257.2.10: download - view: text, markup, annotated - select for diffs
Mon Nov 29 07:24:06 2004 UTC (21 years, 11 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.257.2.9: preferred, colored
Changes since revision 1.257.2.9: +9 -3 lines
Sync with HEAD.

Revision 1.297: download - view: text, markup, annotated - select for diffs
Thu Nov 18 22:14:53 2004 UTC (22 years ago) by bouyer
Branches: MAIN
CVS tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Diff to: previous 1.296: preferred, colored
Changes since revision 1.296: +9 -3 lines
Some drives reports ATA version < 4, and still support (and need) the
WDCC_FLUSHCACHE command. So for drive < ATA4, test WDC_CMD2_FC in atap_cmd_set2
before returning ENODEV.
Problem reported and fix tested by Michael Gerhards on port-sparc64.

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

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

Revision 1.257.2.8: download - view: text, markup, annotated - select for diffs
Tue Oct 19 15:56:44 2004 UTC (22 years, 1 month ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.257.2.7: preferred, colored
Changes since revision 1.257.2.7: +82 -28 lines
Sync with HEAD

Revision 1.274.2.8: download - view: text, markup, annotated - select for diffs
Fri Oct 1 03:48:30 2004 UTC (22 years, 1 month ago) by jmc
Branches: netbsd-2-0
CVS tags: netbsd-2-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2
Diff to: previous 1.274.2.7: preferred, colored; branchpoint 1.274: preferred, colored
Changes since revision 1.274.2.7: +17 -4 lines
Pullup rev 1.295 (requested by bouyer in ticket #882)

Add a WD_QUIRK_FORCE_LBA48 quirck, which forces all access to use LBA48.
Use it for ST3200822A, which has a broken firmware and return an error
when accessing sector 0xfffffff with a LBA command.

Revision 1.295: download - view: text, markup, annotated - select for diffs
Tue Sep 28 18:22:33 2004 UTC (22 years, 1 month ago) by bouyer
Branches: MAIN
Diff to: previous 1.294: preferred, colored
Changes since revision 1.294: +17 -4 lines
Add a WD_QUIRK_FORCE_LBA48 quirck, which forces all access to use LBA48.
Use it for ST3200822A, which has a broken firmware and return an error
when accessing sector 0xfffffff with a LBA command.
Patch tested by David Brownlee.

Revision 1.294: download - view: text, markup, annotated - select for diffs
Sat Sep 25 03:34:02 2004 UTC (22 years, 1 month ago) by thorpej
Branches: MAIN
Diff to: previous 1.293: preferred, colored
Changes since revision 1.293: +67 -26 lines
Add support for wedges to the ATA disk driver.

Revision 1.257.2.7: download - view: text, markup, annotated - select for diffs
Tue Sep 21 13:27:24 2004 UTC (22 years, 1 month ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.257.2.6: preferred, colored
Changes since revision 1.257.2.6: +7 -7 lines
Fix the sync with head I botched.

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

Revision 1.274.2.7: download - view: text, markup, annotated - select for diffs
Fri Sep 17 04:01:47 2004 UTC (22 years, 2 months ago) by jmc
Branches: netbsd-2-0
CVS tags: netbsd-2-0-RC1
Diff to: previous 1.274.2.6: preferred, colored; branchpoint 1.274: preferred, colored
Changes since revision 1.274.2.6: +3 -3 lines
Pullup patch (requested by bouyer in ticket #853)

In case of error, reset the channel with AT_RST_NOCMD. We know the reset
wont abort any command at this point.

Revision 1.293: download - view: text, markup, annotated - select for diffs
Thu Sep 16 20:52:43 2004 UTC (22 years, 2 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.292: preferred, colored
Changes since revision 1.292: +3 -3 lines
In case of error, reset the channel with AT_RST_NOCMD. We know the reset
won't abort any command at this point.

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

Revision 1.292: download - view: text, markup, annotated - select for diffs
Mon Aug 30 09:34:41 2004 UTC (22 years, 2 months ago) by drochner
Branches: MAIN
Diff to: previous 1.291: preferred, colored
Changes since revision 1.291: +12 -6 lines
make the software managed bad-sector list optional
(kernel option WD_SOFTBADSECT)

Revision 1.257.2.4: download - view: text, markup, annotated - select for diffs
Wed Aug 25 06:57:34 2004 UTC (22 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.257.2.3: preferred, colored
Changes since revision 1.257.2.3: +44 -30 lines
Sync with HEAD.

Revision 1.291: download - view: text, markup, annotated - select for diffs
Sat Aug 21 00:28:34 2004 UTC (22 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.290: preferred, colored
Changes since revision 1.290: +20 -7 lines
atastart() (called only at splbio(), and from interrupts) can change
drive_flags, to make sure all drive_flags manipulations are done at
splbio().

Revision 1.290: download - view: text, markup, annotated - select for diffs
Fri Aug 20 17:19:44 2004 UTC (22 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.289: preferred, colored
Changes since revision 1.289: +5 -4 lines
Rename the ata_bustype "ata_reset_channel" member to "ata_reset_drive"
to reflect the new reality after Manuel added the bus reset ioctls.

Revision 1.289: download - view: text, markup, annotated - select for diffs
Fri Aug 13 04:10:49 2004 UTC (22 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.288: preferred, colored
Changes since revision 1.288: +23 -23 lines
WDCDEBUG -> ATADEBUG.

Revision 1.257.2.3: download - view: text, markup, annotated - select for diffs
Thu Aug 12 11:41:22 2004 UTC (22 years, 3 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.257.2.2: preferred, colored
Changes since revision 1.257.2.2: +123 -94 lines
Sync with HEAD.

Revision 1.288: download - view: text, markup, annotated - select for diffs
Thu Aug 12 05:02:50 2004 UTC (22 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.287: preferred, colored
Changes since revision 1.287: +12 -12 lines
Rename some constants:
WDC_COMPLETE -> ATACMD_COMPLETE
WDC_QUEUED -> ATACMD_QUEUED
WDC_TRY_AGAIN -> ATACMD_TRY_AGAIN

Revision 1.287: download - view: text, markup, annotated - select for diffs
Thu Aug 12 04:57:19 2004 UTC (22 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.286: preferred, colored
Changes since revision 1.286: +67 -67 lines
Rename "struct wdc_command" to "struct ata_command".

Revision 1.274.2.6: download - view: text, markup, annotated - select for diffs
Wed Aug 11 19:47:48 2004 UTC (22 years, 3 months ago) by jmc
Branches: netbsd-2-0
Diff to: previous 1.274.2.5: preferred, colored; branchpoint 1.274: preferred, colored
Changes since revision 1.274.2.5: +15 -12 lines
Pullup rev 1.282-1.283 (requested by bouyer in ticket #735)

Move cleaning of the bad block list in wddetach() after the call to
disk_detach(), to avoid a race condition with the interrupt code.
wddetach(): move lockmgr(LK_DRAIN) near the end; otherwise we'll panic in
wddone() (vdevgone() may end up calling it) trying to get the lock.
wdopen(): check for DVF_ACTIVE.

Revision 1.274.2.5: download - view: text, markup, annotated - select for diffs
Wed Aug 11 19:44:02 2004 UTC (22 years, 3 months ago) by jmc
Branches: netbsd-2-0
Diff to: previous 1.274.2.4: preferred, colored; branchpoint 1.274: preferred, colored
Changes since revision 1.274.2.4: +7 -2 lines
Pullup rev 1.281 (requested by bouyer in ticket #733)

Implement asynchronous channel reset.
Use this to reset the channel before doing a dump, instead of the hack in
  wdc_exec_xfer() based on C_POLL. This hack was causing problems on
  controllers with a shared queue, because we now can have C_POLL set during
  concurent channels probes

Revision 1.286: download - view: text, markup, annotated - select for diffs
Tue Aug 10 02:33:58 2004 UTC (22 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.285: preferred, colored
Changes since revision 1.285: +51 -27 lines
A few things:
* Kill off device nodes *before* we clear out the queue, to help prevent any
  new I/O being queued.
* More useful error reporting in wd_setcache() and wd_flushcache().
* Add a wd_standby() (tested but not used yet).

And the most important:
* In wddetach(), if the device was open, call adapt_delref() so that we
  propagate the disable up to our PCMCIA socket.

Revision 1.285: download - view: text, markup, annotated - select for diffs
Wed Aug 4 22:44:04 2004 UTC (22 years, 3 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.284: preferred, colored
Changes since revision 1.284: +3 -2 lines
Change wdc_kill_pending() to take a struct ata_drive_datas * as argument,
and kill only pending requests for this drive.
Implement a DRIVE_WAITDRAIN flag, which will cause the active command to
be killed once complete.
Other minor fixes.
Now it's possible to detach a ATA or ATAPI device from ioctl even when
a dd on the raw char partition is running.

Revision 1.284: download - view: text, markup, annotated - select for diffs
Tue Aug 3 22:37:19 2004 UTC (22 years, 3 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.283: preferred, colored
Changes since revision 1.283: +3 -2 lines
First cut at implementing ATABUSIODETACH. Still buggy.

Revision 1.283: download - view: text, markup, annotated - select for diffs
Tue Aug 3 22:03:46 2004 UTC (22 years, 3 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.282: preferred, colored
Changes since revision 1.282: +7 -4 lines
wddetach(): move lockmgr(LK_DRAIN) near the end; otherwise we'll panic in
wddone() (vdevgone() may end up calling it) trying to get the lock.
wdopen(): check for DVF_ACTIVE.

Revision 1.282: download - view: text, markup, annotated - select for diffs
Tue Aug 3 21:38:45 2004 UTC (22 years, 3 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.281: preferred, colored
Changes since revision 1.281: +10 -10 lines
move cleaning of the bad block list in wddetach() after the call to
disk_detach(), to avoid a race condition with the interrupt code.

Revision 1.257.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:45:46 2004 UTC (22 years, 3 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.257.2.1: preferred, colored
Changes since revision 1.257.2.1: +149 -238 lines
Sync with HEAD

Revision 1.281: download - view: text, markup, annotated - select for diffs
Sat Jul 31 21:26:43 2004 UTC (22 years, 3 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.280: preferred, colored
Changes since revision 1.280: +7 -2 lines
Implement asynchronous channel reset.
Use this to reset the channel before doing a dump, instead of the hack in
  wdc_exec_xfer() based on C_POLL. This hack was causing problems on
  controllers with a shared queue, because we now can have C_POLL set during
  concurent channels probes (problem found and analysed on sparc64 by
  Martin Husemann).
This should even make core dumps marginally more reliable on ATA drives.

Revision 1.274.2.4: download - view: text, markup, annotated - select for diffs
Fri Jul 23 13:32:11 2004 UTC (22 years, 3 months ago) by tron
Branches: netbsd-2-0
Diff to: previous 1.274.2.3: preferred, colored; branchpoint 1.274: preferred, colored
Changes since revision 1.274.2.3: +4 -4 lines
Pull up revision 1.278 (requested by mycroft in ticket #704):
Fix an extremely obvious bug in the handling of the bad block list: the "max"
block was being set 512x further out than it should be, causing rather severe
escalation of the error.

Revision 1.274.2.3: download - view: text, markup, annotated - select for diffs
Fri Jul 2 17:08:38 2004 UTC (22 years, 4 months ago) by he
Branches: netbsd-2-0
Diff to: previous 1.274.2.2: preferred, colored; branchpoint 1.274: preferred, colored
Changes since revision 1.274.2.2: +4 -12 lines
Pull up revisions 1.279-1.280 (requested by mycroft in ticket #572):
  Several fixes mostly related to USB:
   o Don't force ATA_SINGLE on devices which don't support
     READ/WRITE MULTI.  Increases performance with several
     CF cards substantially.
   o Update copyright.

Revision 1.280: download - view: text, markup, annotated - select for diffs
Tue Jun 22 19:20:56 2004 UTC (22 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.279: preferred, colored
Changes since revision 1.279: +3 -3 lines
Update copyright.

Revision 1.279: download - view: text, markup, annotated - select for diffs
Tue Jun 22 19:20:14 2004 UTC (22 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.278: preferred, colored
Changes since revision 1.278: +3 -11 lines
Do not force ATA_SINGLE on devices that don't support READ/WRITE MULTI.  We
just have to take an interrupt for each sector.
Tested with one laptop disk (which normally runs in DMA mode and was forced
to single-sector transfers) and 3 CF cards.  Increases the performance of
the CF cards substantially (760KB/s->1240KB/s in one case, 410KB/s->750KB/s
in the other two cases).

Revision 1.278: download - view: text, markup, annotated - select for diffs
Tue Jun 1 20:53:03 2004 UTC (22 years, 5 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.277: preferred, colored
Changes since revision 1.277: +4 -4 lines
Fix an extremely obvious bug in the handling of the bad block list: the "max"
block was being set 512x further out than it should be, causing rather severe
escalation of the error.

XXX WTF is the point of this shit, anyway?  In most cases, the way you're
supposed to fix a bad block on an ATA disk is to rewrite it -- which will
either just transparently fix it, or spare it.  This code actively prevents
that.

Revision 1.274.2.2: download - view: text, markup, annotated - select for diffs
Sat May 29 14:18:45 2004 UTC (22 years, 5 months ago) by tron
Branches: netbsd-2-0
Diff to: previous 1.274.2.1: preferred, colored; branchpoint 1.274: preferred, colored
Changes since revision 1.274.2.1: +21 -10 lines
Pull up revision 1.276 (requested by bouyer in ticket #398):
Add support for the DIOCCACHESYNC ioctl.

Revision 1.277: download - view: text, markup, annotated - select for diffs
Thu May 27 02:23:12 2004 UTC (22 years, 5 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.276: preferred, colored
Changes since revision 1.276: +6 -6 lines
Clean-up of use of "precomp".  It is used as "features" everywhere, so
rename the fields in wdc_command as appropriate.

Revision 1.276: download - view: text, markup, annotated - select for diffs
Fri May 21 20:35:53 2004 UTC (22 years, 6 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.275: preferred, colored
Changes since revision 1.275: +21 -10 lines
Add support for the DIOCCACHESYNC ioctl.

Revision 1.220.10.7: download - view: text, markup, annotated - select for diffs
Fri May 14 06:07:34 2004 UTC (22 years, 6 months ago) by jdc
Branches: netbsd-1-6
Diff to: previous 1.220.10.6: preferred, colored; branchpoint 1.220: preferred, colored; next MAIN 1.221: preferred, colored
Changes since revision 1.220.10.6: +7 -3 lines
Pull up revision 1.275 via patch (requested by bouyer in ticket #1691)

When using LBA48, use Flush cache extended command if supported.
From Christos Zoulas in PR 25366, with minor adjustements from me.

Revision 1.274.2.1: download - view: text, markup, annotated - select for diffs
Sun May 9 08:19:18 2004 UTC (22 years, 6 months ago) by jdc
Branches: netbsd-2-0
Diff to: previous 1.274: preferred, colored
Changes since revision 1.274: +7 -3 lines
Pull up revision 1.275 (requested by bouyer in ticket #262)

When using LBA48, use Flush cache extended command if supported.
From Christos Zoulas in PR 25366, with minor adjustements from me.

Revision 1.275: download - view: text, markup, annotated - select for diffs
Mon May 3 20:11:40 2004 UTC (22 years, 6 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.274: preferred, colored
Changes since revision 1.274: +7 -3 lines
When using LBA48, use Flush cache extended command if supported.
From Christos Zoulas in PR 25366, with minor adjustements from me.

Revision 1.220.10.6: download - view: text, markup, annotated - select for diffs
Sun Mar 28 08:13:09 2004 UTC (22 years, 7 months ago) by jmc
Branches: netbsd-1-6
Diff to: previous 1.220.10.5: preferred, colored; branchpoint 1.220: preferred, colored
Changes since revision 1.220.10.5: +9 -4 lines
Pullup rev 1.260 via patch (requested by bouyer in ticket #1629)

For LBA drives, compute the number of cylinders from the drive capacity
in the default disklabel and the boot message, instead of using the
value reported by the drive (which is 16383 if the drive is larger than 8G).
Fixes PR#9864

Revision 1.220.10.5: download - view: text, markup, annotated - select for diffs
Sun Mar 28 08:07:44 2004 UTC (22 years, 7 months ago) by jmc
Branches: netbsd-1-6
Diff to: previous 1.220.10.4: preferred, colored; branchpoint 1.220: preferred, colored
Changes since revision 1.220.10.4: +7 -4 lines
Pullup rev 1.258 via patch (requested by bouyer in ticket #1628)

Add LBA48_THRESHOLD #define and set it to the *correct* value.  Use it
in place of 0xffffff  (which is one too few 'f').

Revision 1.274: download - view: text, markup, annotated - select for diffs
Sat Feb 28 06:28:47 2004 UTC (22 years, 8 months ago) by yamt
Branches: MAIN
CVS tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Diff to: previous 1.273: preferred, colored
Changes since revision 1.273: +3 -8 lines
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.273: download - view: text, markup, annotated - select for diffs
Sat Jan 10 14:39:50 2004 UTC (22 years, 10 months ago) by yamt
Branches: MAIN
Diff to: previous 1.272: preferred, colored
Changes since revision 1.272: +5 -2 lines
store a i/o priority hint in struct buf for buffer queue discipline.

Revision 1.272: download - view: text, markup, annotated - select for diffs
Sun Dec 14 05:38:20 2003 UTC (22 years, 11 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.271: preferred, colored
Changes since revision 1.271: +3 -2 lines
Move the wddone() prototype to wd.c

Revision 1.271: download - view: text, markup, annotated - select for diffs
Sun Dec 14 05:37:25 2003 UTC (22 years, 11 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.270: preferred, colored
Changes since revision 1.270: +2 -4 lines
Garbage-collect __ATA_DISK_PRIVATE; it is no longer needed.

Revision 1.270: download - view: text, markup, annotated - select for diffs
Sun Dec 14 05:33:29 2003 UTC (22 years, 11 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.269: preferred, colored
Changes since revision 1.269: +4 -3 lines
Instead of calling wddone() directly, set a (*drv_done)() callback in
the ata_drive_datas structure and invoke that.

Revision 1.269: download - view: text, markup, annotated - select for diffs
Thu Dec 4 13:57:30 2003 UTC (22 years, 11 months ago) by keihan
Branches: MAIN
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +3 -3 lines
netbsd.org -> NetBSD.org

This was the last commit of this kind to src/sys, which is now totally
"NetBSD.org clean".  Thanks for the patiance, and sorry for all the commits.

Revision 1.268: download - view: text, markup, annotated - select for diffs
Sun Nov 30 13:57:12 2003 UTC (22 years, 11 months ago) by yamt
Branches: MAIN
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +3 -3 lines
- rename WDC_CAP_LBA48 to ATA_CMD2_LBA48.
- remove WDC_CAP_QUEUE. (there's already ATA_CMD2_RWQ.)

as discussed on tech-kern@.

Revision 1.267: download - view: text, markup, annotated - select for diffs
Fri Nov 7 04:10:56 2003 UTC (23 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.266: preferred, colored
Changes since revision 1.266: +13 -56 lines
Replace home-grown locks with lockmgr().

Revision 1.266: download - view: text, markup, annotated - select for diffs
Wed Oct 29 21:27:38 2003 UTC (23 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.265: preferred, colored
Changes since revision 1.265: +2 -4 lines
Back out the bogus initializer -- the compiler bug is fixed.

Revision 1.265: download - view: text, markup, annotated - select for diffs
Tue Oct 28 02:01:46 2003 UTC (23 years ago) by cl
Branches: MAIN
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +3 -3 lines
note 'm68k {u,}int64_t used uninitialized' bug.
add reference to gcc bug report.
mark all (known) occurrences.

Revision 1.264: download - view: text, markup, annotated - select for diffs
Mon Oct 27 23:06:15 2003 UTC (23 years ago) by fredb
Branches: MAIN
Diff to: previous 1.263: preferred, colored
Changes since revision 1.263: +4 -2 lines
Appease gcc3 "-Wno-uninitialized".

Revision 1.263: download - view: text, markup, annotated - select for diffs
Wed Oct 8 20:58:00 2003 UTC (23 years, 1 month ago) by bouyer
Branches: MAIN
Diff to: previous 1.262: preferred, colored
Changes since revision 1.262: +4 -4 lines
Following Matt Thomas's request, rename ata attribute to ata_hl, and
wdc_base to ata. We can now have
atabus* at ata?
in kernel config files.

Revision 1.262: download - view: text, markup, annotated - select for diffs
Wed Oct 8 10:58:12 2003 UTC (23 years, 1 month ago) by bouyer
Branches: MAIN
Diff to: previous 1.261: preferred, colored
Changes since revision 1.261: +8 -13 lines
Make the ATA mid-layer appears as atabus, as proposed in
http://mail-index.netbsd.org/tech-kern/2003/09/25/0006.html
This adds a device (atabus) between IDE controllers and wd or atapibus, to
have each ATA channel show up in the device tree. Later there will be atabus
devices in /dev, so that we can do IOCTL on them.
Each atabus has its own kernel thread, to handle operations that needs polling,
e.g. reset and others.

Device probing on each bus it defered to the atabus thread creation.
This allows to do the reset and basic device probes in parallel, which reduce
boot time on systems with several pciide controllers.

Revision 1.261: download - view: text, markup, annotated - select for diffs
Fri Sep 19 21:36:01 2003 UTC (23 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +4 -4 lines
1) Use config_interrupts() to attach IDE and ATAPI drives.  This eliminates
   most polling.
2) Clean up some goofiness in pciide -- get rid of the whole "candisable" path
   (it's gratuitous) and simplify the code by calling pciide_map_compat_intr(),
   *_set_modes() and wdc_print_modes() from central locations.
3) Add a register writability and register ghost test to eliminate phantom
   drives more quickly.

Revision 1.220.10.4: download - view: text, markup, annotated - select for diffs
Fri Aug 15 19:33:23 2003 UTC (23 years, 3 months ago) by tron
Branches: netbsd-1-6
CVS tags: 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
Diff to: previous 1.220.10.3: preferred, colored; branchpoint 1.220: preferred, colored
Changes since revision 1.220.10.3: +4 -4 lines
Pull up revision 1.256 (requested by bouyer in ticket #1370):
Don't use LBA48 if we don't have to (that is, if the request is inside the
first 128GB). Tested by Andreas Johansson.

Revision 1.260: download - view: text, markup, annotated - select for diffs
Sun Aug 3 17:53:04 2003 UTC (23 years, 3 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.259: preferred, colored
Changes since revision 1.259: +9 -4 lines
For LBA drives, compute the number of cylinders from the drive capacity
in the default disklabel and the boot message, instead of using the
value reported by the drive (which is 16383 if the drive is larger than 8G).
Should fix PR 9864

Revision 1.259: download - view: text, markup, annotated - select for diffs
Fri Jul 11 15:33:13 2003 UTC (23 years, 4 months ago) by dsl
Branches: MAIN
Diff to: previous 1.258: preferred, colored
Changes since revision 1.258: +78 -136 lines
KNF and whitespace (and indent a contuation line)

Revision 1.258: download - view: text, markup, annotated - select for diffs
Thu Jul 10 23:23:44 2003 UTC (23 years, 4 months ago) by matt
Branches: MAIN
Diff to: previous 1.257: preferred, colored
Changes since revision 1.257: +6 -4 lines
Add LBA48_THRESHOLD #define and set it to the *correct* value.  Use it
in place of "0xffffff" (which is one too few 'f').

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

Revision 1.220.10.3: download - view: text, markup, annotated - select for diffs
Mon Jun 30 02:57:01 2003 UTC (23 years, 4 months ago) by grant
Branches: netbsd-1-6
Diff to: previous 1.220.10.2: preferred, colored; branchpoint 1.220: preferred, colored
Changes since revision 1.220.10.2: +76 -2 lines
Apply patch (requested by bouyer in ticket #1354):

Add support for the getcache/setcache ioctls.

Acceptable cache operations are r and rw, not none and w
Properly initialise the timeout value.

Fix typo.

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

Revision 1.256: download - view: text, markup, annotated - select for diffs
Sun Jun 29 19:28:16 2003 UTC (23 years, 4 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +4 -4 lines
Don't use LBA48 if we don't have to (that is, if the request is inside the
first 128GB). Tested by Andreas Johansson.

Revision 1.255: download - view: text, markup, annotated - select for diffs
Sun Jun 29 17:03:47 2003 UTC (23 years, 4 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.254: preferred, colored
Changes since revision 1.254: +2 -3 lines
Remove unused WAITTIME definition. Pointed out by Andreas Johansson.

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

Bump the kernel rev up to 1.6V

Revision 1.253: download - view: text, markup, annotated - select for diffs
Sat May 17 21:52:03 2003 UTC (23 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +12 -10 lines
* Use aprint*().
* Add Ultra/133 to wdc_print_modes().

Revision 1.252: download - view: text, markup, annotated - select for diffs
Sat May 10 23:12:44 2003 UTC (23 years, 6 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.251: preferred, colored
Changes since revision 1.251: +3 -3 lines
Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.

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

Revision 1.250: download - view: text, markup, annotated - select for diffs
Sun Apr 27 14:33:20 2003 UTC (23 years, 6 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +3 -3 lines
Fix typo.

Revision 1.249: download - view: text, markup, annotated - select for diffs
Sun Apr 27 14:27:36 2003 UTC (23 years, 6 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +6 -4 lines
Acceptable cache operations are r and rw, not none and w
Properly initialise the timeout value.

Revision 1.248: download - view: text, markup, annotated - select for diffs
Sat Apr 26 09:54:15 2003 UTC (23 years, 6 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.247: preferred, colored
Changes since revision 1.247: +75 -2 lines
Add support for the getcache/setcache ioctls.

Revision 1.247: download - view: text, markup, annotated - select for diffs
Fri Apr 18 04:32:19 2003 UTC (23 years, 7 months ago) by explorer
Branches: MAIN
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +4 -2 lines
add my 80 GB SATA drive to the quirk table.

Revision 1.246: download - view: text, markup, annotated - select for diffs
Fri Apr 18 00:35:14 2003 UTC (23 years, 7 months ago) by mason
Branches: MAIN
Diff to: previous 1.245: preferred, colored
Changes since revision 1.245: +3 -3 lines
From current-users:

On Thu, Apr 17, 2003 at 11:26:26AM -0500, Dave Huang wrote:

> Typo police here :) "whose," not "who's."

Revision 1.245: download - view: text, markup, annotated - select for diffs
Wed Apr 16 00:07:17 2003 UTC (23 years, 7 months ago) by darrenr
Branches: MAIN
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +5 -3 lines
add missing setting of b_error (thanks Manuel)

Revision 1.244: download - view: text, markup, annotated - select for diffs
Tue Apr 15 19:14:58 2003 UTC (23 years, 7 months ago) by nathanw
Branches: MAIN
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +3 -3 lines
Add a missing paren.

Revision 1.243: download - view: text, markup, annotated - select for diffs
Tue Apr 15 18:27:26 2003 UTC (23 years, 7 months ago) by darrenr
Branches: MAIN
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +37 -11 lines
Implement (and document!) "dkctl <dev> badsector .." to `manage' the bad
sector information in the kernel.  Doing this uncovered some shortcomings
that should have been pretty obvious with the code committed prior, addressing
the major kludge with a new struct - disk_bacsecinfo to be passed into
DIOCBSLIST.

Revision 1.242: download - view: text, markup, annotated - select for diffs
Tue Apr 15 17:42:44 2003 UTC (23 years, 7 months ago) by dogcow
Branches: MAIN
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +4 -4 lines
fix typos

Revision 1.241: download - view: text, markup, annotated - select for diffs
Tue Apr 15 14:11:00 2003 UTC (23 years, 7 months ago) by darrenr
Branches: MAIN
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +77 -2 lines
Automatically build up a list of bad sectors from failed read operations and
prempt read operations on matching regions with a failure rather than waiting
for the device to return a failure.  The I/O operation must have already failed
MAXRETRIES times before being added to the list - this can generally take up
to 12 seconds.
List is made accessible to userspace via DIOCBSLIST and DIOCBSFLUSH.

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

Revision 1.239: download - view: text, markup, annotated - select for diffs
Fri Mar 21 22:40:56 2003 UTC (23 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +152 -4 lines
Work around a buggy PHY in some Seagate S-ATA drives which get confused
by the way some S-ATA controllers packetize data when the sector count of
the transfer mod 15 is 1.

Revision 1.238: download - view: text, markup, annotated - select for diffs
Sun Feb 23 08:50:58 2003 UTC (23 years, 8 months ago) by yamt
Branches: MAIN
Diff to: previous 1.237: preferred, colored
Changes since revision 1.237: +3 -2 lines
initialize b_interlock properly.
(for ioctl)

Revision 1.237: download - view: text, markup, annotated - select for diffs
Mon Jan 27 18:21:29 2003 UTC (23 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +4 -48 lines
Experimental support for RAID volumes configured by ATA "RAID" controllers.
Such RAID controllers are actually just IDE controllers with a BIOS that
can create RAID volumes and write the configuration info to config blocks
on the disks.  The BIOS can do I/O to these volumes, and the OS must
understand the config blocks and implement RAID in software in order to be
able to use these volumes.

Only SPAN (simple concatenation) and RAID0 are supported at this time,
and writing back config blocks is also not supported at this time.  Currently,
only the Promise configuration scheme is supported, although supporting
the Highpoint scheme should not be too difficult.

In any case, this is sufficient to use the Promise RAID0 volume (thus
preserving the win2k AS installation) on this new Intel server I have.

Thanks to Soren Schmidt for doing the work in FreeBSD; it made this
task much easier.  The config block parsing code is adapted from his
work.

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

bounds_check_with_label() RAW_PART too.

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

Revision 1.212.2.10: download - view: text, markup, annotated - select for diffs
Tue Jan 7 21:34:03 2003 UTC (23 years, 10 months ago) by thorpej
Branches: nathanw_sa
CVS tags: nathanw_sa_end
Diff to: previous 1.212.2.9: preferred, colored; branchpoint 1.212: preferred, colored; next MAIN 1.213: preferred, colored
Changes since revision 1.212.2.9: +4 -3 lines
Sync with HEAD.

Revision 1.234: download - view: text, markup, annotated - select for diffs
Tue Jan 7 18:35:04 2003 UTC (23 years, 10 months ago) by fvdl
Branches: MAIN
CVS tags: nathanw_sa_before_merge, nathanw_sa_base
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +4 -3 lines
Fix error in ODIOCGDINFO handling caused by previous change to it.

Revision 1.212.2.9: download - view: text, markup, annotated - select for diffs
Thu Dec 19 00:48:03 2002 UTC (23 years, 11 months ago) by thorpej
Branches: nathanw_sa
Diff to: previous 1.212.2.8: preferred, colored; branchpoint 1.212: preferred, colored
Changes since revision 1.212.2.8: +38 -21 lines
Sync with HEAD.

Revision 1.233: download - view: text, markup, annotated - select for diffs
Sun Dec 15 01:56:02 2002 UTC (23 years, 11 months ago) by fvdl
Branches: MAIN
CVS tags: gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +38 -21 lines
Avoid using a lot of kernel stack.

Revision 1.212.2.8: download - view: text, markup, annotated - select for diffs
Mon Nov 11 22:08:58 2002 UTC (24 years ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.212.2.7: preferred, colored; branchpoint 1.212: preferred, colored
Changes since revision 1.212.2.7: +8 -2 lines
Catch up to -current

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

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

this is just the kernel portion.

Revision 1.231: download - view: text, markup, annotated - select for diffs
Wed Oct 23 09:13:07 2002 UTC (24 years ago) by jdolecek
Branches: MAIN
CVS tags: kqueue-aftermerge
Diff to: previous 1.230: preferred, colored
Changes since revision 1.230: +3 -3 lines
merge kqueue branch into -current

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

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

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe

Revision 1.230: download - view: text, markup, annotated - select for diffs
Fri Oct 18 14:31:13 2002 UTC (24 years, 1 month ago) by junyoung
Branches: MAIN
CVS tags: kqueue-beforemerge
Diff to: previous 1.229: preferred, colored
Changes since revision 1.229: +7 -2 lines
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.212.2.7: download - view: text, markup, annotated - select for diffs
Fri Oct 18 02:41:30 2002 UTC (24 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.212.2.6: preferred, colored; branchpoint 1.212: preferred, colored
Changes since revision 1.212.2.6: +2 -7 lines
Catch up to -current.

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

Revision 1.229: download - view: text, markup, annotated - select for diffs
Wed Oct 2 16:33:37 2002 UTC (24 years, 1 month ago) by thorpej
Branches: MAIN
CVS tags: kqueue-base
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +3 -3 lines
Add trailing ; to CFATTACH_DECL.

Revision 1.228: download - view: text, markup, annotated - select for diffs
Mon Sep 30 20:42:10 2002 UTC (24 years, 1 month ago) by thorpej
Branches: MAIN
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +4 -5 lines
Use CFATTACH_DECL().

Revision 1.227: download - view: text, markup, annotated - select for diffs
Fri Sep 27 20:37:35 2002 UTC (24 years, 1 month ago) by thorpej
Branches: MAIN
Diff to: previous 1.226: preferred, colored
Changes since revision 1.226: +3 -3 lines
Declare all cfattach structures const.

Revision 1.226: download - view: text, markup, annotated - select for diffs
Fri Sep 27 17:17:53 2002 UTC (24 years, 1 month ago) by drochner
Branches: MAIN
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +2 -6 lines
Remove a check whether the drive is initialized before crashdump.
It prevents dumping on an otherwise unused disk and seems
unnecessary anyway - the driver will deal with initialization.
fixes my PR kern/18135

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

Revision 1.225: download - view: text, markup, annotated - select for diffs
Fri Sep 6 13:18:43 2002 UTC (24 years, 2 months ago) by gehenna
Branches: MAIN
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +22 -13 lines
Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.

Revision 1.214.2.3: download - view: text, markup, annotated - select for diffs
Fri Sep 6 08:43:56 2002 UTC (24 years, 2 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.214.2.2: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.2.2: +40 -31 lines
sync kqueue branch with HEAD

Revision 1.220.8.4: download - view: text, markup, annotated - select for diffs
Thu Aug 29 05:22:21 2002 UTC (24 years, 2 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.220.8.3: preferred, colored; branchpoint 1.220: preferred, colored; next MAIN 1.221: preferred, colored
Changes since revision 1.220.8.3: +5 -3 lines
catch up with -current.

Revision 1.212.2.5: download - view: text, markup, annotated - select for diffs
Thu Aug 1 02:44:37 2002 UTC (24 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.212.2.4: preferred, colored; branchpoint 1.212: preferred, colored
Changes since revision 1.212.2.4: +40 -31 lines
Catch up to -current.

Revision 1.220.10.2: download - view: text, markup, annotated - select for diffs
Mon Jul 22 04:45:32 2002 UTC (24 years, 4 months ago) by lukem
Branches: netbsd-1-6
CVS tags: netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Diff to: previous 1.220.10.1: preferred, colored; branchpoint 1.220: preferred, colored
Changes since revision 1.220.10.1: +3 -11 lines
Pull up revision 1.222 (requested by yamt in ticket #536):
do previous differently for wddump case.

Revision 1.220.10.1: download - view: text, markup, annotated - select for diffs
Mon Jul 22 04:44:07 2002 UTC (24 years, 4 months ago) by lukem
Branches: netbsd-1-6
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +41 -24 lines
Pull up revision 1.221 (requested by yamt in ticket #536):
- remove big buffers on stack. discussed on tech-kern.
- constify.

Revision 1.224: download - view: text, markup, annotated - select for diffs
Sun Jul 21 15:32:17 2002 UTC (24 years, 4 months ago) by hannken
Branches: MAIN
CVS tags: gehenna-devsw-base
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +5 -3 lines
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.220.8.3: download - view: text, markup, annotated - select for diffs
Sat Jul 20 11:35:06 2002 UTC (24 years, 4 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.220.8.2: preferred, colored; branchpoint 1.220: preferred, colored
Changes since revision 1.220.8.2: +7 -9 lines
catch up with -current.

Revision 1.223: download - view: text, markup, annotated - select for diffs
Tue Jul 16 18:03:17 2002 UTC (24 years, 4 months ago) by hannken
Branches: MAIN
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +7 -9 lines
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.220.8.2: download - view: text, markup, annotated - select for diffs
Mon Jul 15 10:35:15 2002 UTC (24 years, 4 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.220.8.1: preferred, colored; branchpoint 1.220: preferred, colored
Changes since revision 1.220.8.1: +33 -24 lines
catch up with -current.

Revision 1.222: download - view: text, markup, annotated - select for diffs
Fri Jun 28 16:50:30 2002 UTC (24 years, 4 months ago) by yamt
Branches: MAIN
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +3 -11 lines
do previous differently for wddump case.

Revision 1.221: download - view: text, markup, annotated - select for diffs
Fri Jun 28 16:40:50 2002 UTC (24 years, 4 months ago) by yamt
Branches: MAIN
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +41 -24 lines
- remove big buffers on stack. discussed on tech-kern.
- constify.

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

Revision 1.212.2.4: download - view: text, markup, annotated - select for diffs
Thu Feb 28 04:13:12 2002 UTC (24 years, 8 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.212.2.3: preferred, colored; branchpoint 1.212: preferred, colored
Changes since revision 1.212.2.3: +28 -13 lines
Catch up to -current.

Revision 1.214.2.2: download - view: text, markup, annotated - select for diffs
Mon Feb 11 20:09:39 2002 UTC (24 years, 9 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.214.2.1: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.2.1: +28 -13 lines
Sync w/ -current.

Revision 1.220: download - view: text, markup, annotated - select for diffs
Sun Jan 13 17:24:30 2002 UTC (24 years, 10 months ago) by christos
Branches: MAIN
CVS tags: newlock-base, newlock, netbsd-1-6-base, ifpoll-base, eeh-devprop-base, eeh-devprop
Branch point for: netbsd-1-6, gehenna-devsw
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +27 -11 lines
Add LBA48 support based on patches from Keisuke YOSHIDA. KNF a bit while
I am there.

Revision 1.219: download - view: text, markup, annotated - select for diffs
Sat Jan 12 16:32:07 2002 UTC (24 years, 10 months ago) by tsutsui
Branches: MAIN
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +3 -4 lines
Call malloc(9) with M_ZERO flag instead of memset() after malloc().

Revision 1.214.2.1: download - view: text, markup, annotated - select for diffs
Thu Jan 10 19:53:40 2002 UTC (24 years, 10 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +64 -23 lines
Sync kqueue branch with -current.

Revision 1.212.2.3: download - view: text, markup, annotated - select for diffs
Tue Jan 8 00:29:22 2002 UTC (24 years, 10 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.212.2.2: preferred, colored; branchpoint 1.212: preferred, colored
Changes since revision 1.212.2.2: +62 -24 lines
Catch up to -current.

Revision 1.218: download - view: text, markup, annotated - select for diffs
Mon Dec 3 00:20:23 2001 UTC (24 years, 11 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +3 -3 lines
Update my copyrigth.

Revision 1.217: download - view: text, markup, annotated - select for diffs
Mon Dec 3 00:11:16 2001 UTC (24 years, 11 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +53 -15 lines
Allow wd to attach to something else than wdc/pciide (like USB<->ATA bridges):
- move some functions from ata.c to ata_wdc.c or wdc.c.
- add callbacks to struct ata_bustype so that wd.c doesn't call directly
  functions from the lower level driver.

Revision 1.216: download - view: text, markup, annotated - select for diffs
Sun Dec 2 22:44:32 2001 UTC (24 years, 11 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +10 -10 lines
Clean up attach of wd/atapibus:
kill ata_atapi_attach. Change atapibus to use a struct scsipi_channel instead
of ata_atapi_attach as attach arch. Create a ata_device, compatible with
scsipi_channel, to attach wd.

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

Revision 1.215: download - view: text, markup, annotated - select for diffs
Tue Nov 13 12:53:09 2001 UTC (25 years ago) by lukem
Branches: MAIN
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +4 -1 lines
add RCSID

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

Revision 1.214.4.2: download - view: text, markup, annotated - select for diffs
Tue Sep 18 19:13:49 2001 UTC (25 years, 2 months ago) by fvdl
Branches: thorpej-devvp
Diff to: previous 1.214.4.1: preferred, colored; branchpoint 1.214: preferred, colored
Changes since revision 1.214.4.1: +3 -3 lines
Various changes to make cloning devices possible:

	* Add an extra argument (struct vnode **) to VOP_OPEN. If it is
	  not NULL, specfs will create a cloned (aliased) vnode during
	  the call, and return it there. The caller should release and
	  unlock the original vnode if a new vnode was returned. The
	  new vnode is returned locked.

	* Add a flag field to the cdevsw and bdevsw structures.
	  DF_CLONING indicates that it wants a new vnode for each
	  open (XXX is there a better way? devprop?)

	* If a device is cloning, always call the close entry
	  point for a VOP_CLOSE.


Also, rewrite cons.c to do the right thing with vnodes. Use VOPs
rather then direct device entry calls. Suggested by mycroft@

Light to moderate testing done an i386 system (arch doesn't matter
though, these are MI changes).

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

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

Revision 1.212.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 21 20:01:18 2001 UTC (25 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +10 -5 lines
Catch up to -current.

Revision 1.214: download - view: text, markup, annotated - select for diffs
Wed Jun 13 18:17:40 2001 UTC (25 years, 5 months ago) by bjh21
Branches: 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, kqueue
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +4 -1 lines
Add explicit support for IDE and SCSI adaptors which don't support interrupts.
On such adaptors, all transfers are done in polling mode.

OK'ed by Manuel on tech-kern.

Revision 1.205.2.2: download - view: text, markup, annotated - select for diffs
Sun May 6 20:48:42 2001 UTC (25 years, 6 months ago) by he
Branches: netbsd-1-5
CVS tags: netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Diff to: previous 1.205.2.1: preferred, colored; branchpoint 1.205: preferred, colored; next MAIN 1.206: preferred, colored
Changes since revision 1.205.2.1: +7 -5 lines
Pull up revision 1.213 (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.213: download - view: text, markup, annotated - select for diffs
Sun May 6 18:30:57 2001 UTC (25 years, 6 months ago) by drochner
Branches: MAIN
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +7 -5 lines
Since __HAVE_OLD_DISKLABEL, DISKMINOR(u, p) isn't continuous over "p"
anymore. So we can't pass a range to vdevgone() but have to loop over the
partitions explicitely.
(otherwise the next device unit will be killed)

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

Revision 1.196.2.4: download - view: text, markup, annotated - select for diffs
Thu Jan 18 09:23:16 2001 UTC (25 years, 10 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.196.2.3: preferred, colored; next MAIN 1.197: preferred, colored
Changes since revision 1.196.2.3: +43 -3 lines
Sync with head (for UBC+NFS fixes, mostly).

Revision 1.212: download - view: text, markup, annotated - select for diffs
Mon Jan 8 02:03:45 2001 UTC (25 years, 10 months ago) by fvdl
Branches: MAIN
CVS tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +3 -3 lines
Return error in the case of using ODIOCGDINFO or ODIOCGDEFLABEL when
the number of partitions is > OLDMAXPARTITIONS. This is better
than silently truncating the label (don't want to silently throw
away partitions when using an old disklabel binary on a label with
> 8 partitions). From Enami Tsugutomo.

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

Revision 1.196.2.3: download - view: text, markup, annotated - select for diffs
Fri Jan 5 17:35:31 2001 UTC (25 years, 10 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.196.2.2: preferred, colored
Changes since revision 1.196.2.2: +3 -3 lines
Sync with HEAD

Revision 1.210: download - view: text, markup, annotated - select for diffs
Thu Dec 14 23:56:18 2000 UTC (25 years, 11 months ago) by lukem
Branches: MAIN
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +3 -3 lines
s/pio/PIO/ and s/lba/LBA/ in messages output to users

Revision 1.196.2.2: download - view: text, markup, annotated - select for diffs
Mon Nov 20 11:39:50 2000 UTC (26 years ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.196.2.1: preferred, colored
Changes since revision 1.196.2.1: +75 -91 lines
Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

Revision 1.193.2.1: download - view: text, markup, annotated - select for diffs
Fri Jul 7 17:33:47 2000 UTC (26 years, 4 months ago) by he
Branches: netbsd-1-4
CVS tags: netbsd-1-4-PATCH003
Diff to: previous 1.193: preferred, colored; next MAIN 1.194: preferred, colored
Changes since revision 1.193: +5 -5 lines
Apply patch (requested by bouyer):
  Add support for the following PCIIDE controllers:
   o AMD 756
   o CMD PCI0648 and PCI0649
   o Hightpoint HPT366
   o OPTi 82c621 (and a few of its derivatives)
   o Promise Ultra/33 and Ultra/66
   o Intel 82801 (ICH/ICH0)
  Also fix PR#10437 (detect more ATAPI devices).

Revision 1.209: download - view: text, markup, annotated - select for diffs
Thu Jul 6 00:48:53 2000 UTC (26 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +4 -4 lines
Use device_lookup() *more*.

Revision 1.208: download - view: text, markup, annotated - select for diffs
Thu Jul 6 00:43:36 2000 UTC (26 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +10 -21 lines
Use device_lookup().

Revision 1.207: download - view: text, markup, annotated - select for diffs
Wed Jul 5 23:31:13 2000 UTC (26 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +1 -17 lines
Garbage-collect __BDEVSW_DUMP_OLD_TYPE.

Revision 1.206: download - view: text, markup, annotated - select for diffs
Wed Jun 28 16:39:25 2000 UTC (26 years, 4 months ago) by mrg
Branches: MAIN
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +1 -3 lines
remove include of <vm/vm.h>

Revision 1.204.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 22 17:06:16 2000 UTC (26 years, 5 months ago) by minoura
Branches: minoura-xpg4dl
Diff to: previous 1.204: preferred, colored; next MAIN 1.205: preferred, colored
Changes since revision 1.204: +2 -2 lines
Sync w/ netbsd-1-5-base.

Revision 1.205: download - view: text, markup, annotated - select for diffs
Sat May 27 16:11:16 2000 UTC (26 years, 5 months ago) by bouyer
Branches: MAIN
CVS tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +2 -2 lines
Ops, state should be RESET, not RECAL here.

Revision 1.204: download - view: text, markup, annotated - select for diffs
Mon May 15 08:32:07 2000 UTC (26 years, 6 months ago) by bouyer
Branches: MAIN
CVS tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +2 -2 lines
Sync my copyrigth notice

Revision 1.203: download - view: text, markup, annotated - select for diffs
Thu Mar 23 07:01:27 2000 UTC (26 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +6 -3 lines
New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.

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

Revision 1.201: download - view: text, markup, annotated - select for diffs
Mon Jan 24 14:51:07 2000 UTC (26 years, 9 months ago) by enami
Branches: MAIN
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +10 -19 lines
Use format_bytes to convert drive capacity into human familier string (like
sd.c does).

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

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

Revision 1.199: download - view: text, markup, annotated - select for diffs
Thu Dec 23 21:23:19 1999 UTC (26 years, 10 months ago) by leo
Branches: MAIN
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +12 -1 lines
Implement the DIOCKLABEL ioctl. Through this ioctl it it possible keep the
disklabel on the last close or to drop it.

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

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

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

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

Revision 1.196.4.1: download - view: text, markup, annotated - select for diffs
Mon Nov 15 00:40:14 1999 UTC (27 years ago) by fvdl
Branches: fvdl-softdep
Diff to: previous 1.196: preferred, colored; next MAIN 1.197: preferred, colored
Changes since revision 1.196: +9 -9 lines
Sync with -current

Revision 1.198: download - view: text, markup, annotated - select for diffs
Wed Nov 10 14:11:34 1999 UTC (27 years ago) by leo
Branches: MAIN
CVS tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, fvdl-softdep-base
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +4 -9 lines
Give lp->d_type a value other than 'unknown'. When the model is "ST506",
the d_type field becomes DTYPE_ST506, otherwise it will be set to DTYPE_ESDI.

Revision 1.196.2.1: download - view: text, markup, annotated - select for diffs
Wed Oct 20 22:03:14 1999 UTC (27 years, 1 month ago) by thorpej
Branches: thorpej_scsipi
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +6 -1 lines
Sync w/ trunk.

Revision 1.197: download - view: text, markup, annotated - select for diffs
Wed Oct 20 15:22:25 1999 UTC (27 years, 1 month ago) by enami
Branches: MAIN
CVS tags: comdex-fall-1999-base, comdex-fall-1999
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +6 -1 lines
Cancel active transfers on aic/wdc detach.
Also makes LS-120 drive works for me again.

Revision 1.196: download - view: text, markup, annotated - select for diffs
Thu Sep 23 11:04:29 1999 UTC (27 years, 2 months ago) by enami
Branches: MAIN
Branch point for: wrstuden-devbsize, thorpej_scsipi, fvdl-softdep
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +82 -3 lines
Allow to detach wdc, atapibus, wd and cd.

Revision 1.195: download - view: text, markup, annotated - select for diffs
Wed Sep 22 09:51:03 1999 UTC (27 years, 2 months ago) by enami
Branches: MAIN
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +2 -2 lines
Fix indentation of close curly brace.

Revision 1.194: download - view: text, markup, annotated - select for diffs
Mon Aug 9 09:48:04 1999 UTC (27 years, 3 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +4 -6 lines
Don't call wddone() from _wdstart(), the ata_wdc system will do it now.
call wd_flushcache() with the proper flags (especially don't set
AT_WAIT | AT_POLL).

Revision 1.193: download - view: text, markup, annotated - select for diffs
Sun Feb 28 17:15:27 1999 UTC (27 years, 8 months ago) by explorer
Branches: MAIN
CVS tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame, chs-ubc2-base, chs-ubc2
Branch point for: netbsd-1-4
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +3 -2 lines
Update to slightly altered rnd_attach_source() api

Revision 1.192: download - view: text, markup, annotated - select for diffs
Sun Feb 21 00:15:42 1999 UTC (27 years, 9 months ago) by hubertf
Branches: MAIN
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +3 -1 lines
Only define WDCDEBUG if not already defined (e.g. by some kernel option)

Revision 1.191: download - view: text, markup, annotated - select for diffs
Thu Feb 18 14:44:34 1999 UTC (27 years, 9 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +2 -2 lines
Add a missing ':'. pointed out by Dave Huang.

Revision 1.190: download - view: text, markup, annotated - select for diffs
Mon Jan 18 20:06:24 1999 UTC (27 years, 10 months ago) by bouyer
Branches: MAIN
CVS tags: bouyer-ide-last-dist
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +52 -28 lines
move wd.c:print_wderror() to ata.c:ata_perror().
In wdc_probe_caps() add code to guess the ATA revision supported (if
ATA4 if Ultra-DMA, ATA2 if PIO mode > 2). We can't rely on param.atap_ata_major
here, at last one Ultra-DMA drive claims to support only ATA-3.
Use the ATA version in ata_perror(), and to try a flush cache command
in a shutdown hook for IDE drives.

Revision 1.189: download - view: text, markup, annotated - select for diffs
Wed Dec 16 13:00:02 1998 UTC (27 years, 11 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +3 -2 lines
Switch to single-sector transfert mode only for the last retry, to let
a chance to the underlying driver to downgrade the mode first.

Revision 1.188: download - view: text, markup, annotated - select for diffs
Mon Nov 23 23:00:27 1998 UTC (27 years, 11 months ago) by kenh
Branches: MAIN
CVS tags: kenh-if-detach-base, kenh-if-detach
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +14 -3 lines
Add a new flag to wdc_command: ATA_READREG.  This will indicate that all
device registers should be read back into the wdc_command structure after
successfull command completion.  Use this this in wdioctl() for
ATAIOCCOMMAND.

Revision 1.187: download - view: text, markup, annotated - select for diffs
Fri Nov 20 01:23:52 1998 UTC (28 years ago) by thorpej
Branches: MAIN
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +16 -3 lines
Implement controller reference counting on ATA devices.

Revision 1.186: download - view: text, markup, annotated - select for diffs
Thu Nov 19 23:44:20 1998 UTC (28 years ago) by kenh
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +32 -32 lines
Rename WDCIOCCOMMAND (and related structures) to ATAIOCCOMMAND

Revision 1.185: download - view: text, markup, annotated - select for diffs
Thu Nov 19 19:46:12 1998 UTC (28 years ago) by kenh
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +238 -2 lines
Add support for the WDCIOCCOMMAND ioctl.  This allows the sending of
arbitrary ATA commands from user-space.  Concepts mostly taken from
the implementation of the SCIOCCOMMAND ioctl.

Revision 1.184: download - view: text, markup, annotated - select for diffs
Wed Nov 11 19:38:27 1998 UTC (28 years ago) by bouyer
Branches: MAIN
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +7 -7 lines
- clearify the boot messages (features supported vs features used). Thanks to
  Havard Eidnes for his complains about this :)
- fix some typo in comments
- hoppefully better detection of drives reporting bogus PIO modes.

Revision 1.183: download - view: text, markup, annotated - select for diffs
Tue Oct 20 17:00:25 1998 UTC (28 years, 1 month ago) by bouyer
Branches: MAIN
CVS tags: chs-ubc-base, chs-ubc
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +6 -6 lines
Donc reset the disk state to 0 in wd.c, set a flag which will cause it
to be reset to 0 at wdcstart(). This fixes a race condition between
normal I/O and wdioclt(). Also use interrupts for wd_get_params in wdopen().

Revision 1.182: download - view: text, markup, annotated - select for diffs
Tue Oct 13 09:34:00 1998 UTC (28 years, 1 month ago) by bouyer
Branches: MAIN
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +8 -8 lines
Properly separate DEBUF_XFERS and DEBUG_FUNCS: DEBUF_XFERS is for data
transfers (may be called often), where DEBUG_FUNCS is for setup functions
(not used for normal contitions).

Revision 1.181: download - view: text, markup, annotated - select for diffs
Mon Oct 12 16:09:16 1998 UTC (28 years, 1 month ago) by bouyer
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +494 -343 lines
Merge bouyer-ide

Revision 1.175.2.13: download - view: text, markup, annotated - select for diffs
Sun Oct 4 15:01:54 1998 UTC (28 years, 1 month ago) by bouyer
Branches: bouyer-ide
CVS tags: bouyer-ide-merge
Diff to: previous 1.175.2.12: preferred, colored; next MAIN 1.176: preferred, colored
Changes since revision 1.175.2.12: +6 -5 lines
atavar.h: drv_softc is a struct device * instead of void*, as it's mostly
          used for dv_xname
wd.c: convert for drv_softc type change, printf cleanup
wdc.c: always call ata_get_params() (params was used initialised with
       non-32bit controllers, leaving to bogus PIO/DMA mode report).
       Cleaup of the PIO/DMA mode message.
pciide_piix_reg.h: Fix definition of PIIX_IDETIM_CLEAR (unused before)
pciide.c: add a method do disable a channel on know device. If a channel
       doesn't have any drive, we disable it and free its resources if disable
       was successfull. This should help with laptops where the second channel
       of the PIIX4 is unused but not disabled by BIOS. On such laptops,
       irq15 can be used for PCMCIA but it was claimed by pciide.
       Misc printf cleanup.
wdc_isa.c: printf cleanup.

Revision 1.175.2.12: download - view: text, markup, annotated - select for diffs
Sun Sep 20 19:00:15 1998 UTC (28 years, 2 months ago) by bouyer
Branches: bouyer-ide
Diff to: previous 1.175.2.11: preferred, colored
Changes since revision 1.175.2.11: +1 -3 lines
Kill the 'old drive' flag. The probe for IDE controllers now looks
like this :
- if status = 0xff for both master and slave, no drive at all -> exit.
- issue a reset (timeout = 31s).
- test signatures: if ATAPI signature, flag a (possible) ATAPI devices here
  else test register writability, then wait for the drive to become
  ready, issue a diagnostic command and wait for the drive to become ready
  if ok, flag a real ATA device.
This looks more like the old probe.
For ATA devices, if IDENTIFY fails, then it's an old drive and use
a fake disklabel/geometry.

Revision 1.175.2.11: download - view: text, markup, annotated - select for diffs
Sun Sep 20 17:08:01 1998 UTC (28 years, 2 months ago) by bouyer
Branches: bouyer-ide
Diff to: previous 1.175.2.10: preferred, colored
Changes since revision 1.175.2.10: +9 -5 lines
Init up xfer->drive in wdc_ata_bio(), or bad things will happen for drive 1.
No need to init xfer->channel, it's done in wdc_exec_xfer().

Revision 1.175.2.10: download - view: text, markup, annotated - select for diffs
Sun Sep 20 13:16:16 1998 UTC (28 years, 2 months ago) by bouyer
Branches: bouyer-ide
Diff to: previous 1.175.2.9: preferred, colored
Changes since revision 1.175.2.9: +7 -3 lines
- always call config_found() from wdcattach(), instead of printing our own
  the "not configured" message ourselve. When no atapibus is configured,
  use a fake ata_atapi_attach, else call wdc_atapibus_attach(). This way we
  don't have to include the whole atapi support in an ata-only config.
- the dma_* function pointers take a 'int flags' as last argument, instead
  of an 'int read'. The 2 valid flags are: WDC_DMA_READ (to select read/write)
  and WDC_DMA_POLL, to signal interrupt-less mode (for core dumps).
- Reworked wdcprobe() so look more like the old one. A status of 0xff is
  interpreted as "no drive" (freebsd does this); this this speed up
  the probe for non-IDE machines (a reset timeout has been bumped to 31s,
  to match the specs). The probe set ups the drive flags to either ATA or
  ATAPI (depend on register signature) or OLD (if register signature don't
  match, but a working drive appears to be there). Later the ATA code
  will look at the OLD flag to decide wether there is no drive, or an old
  (ST506) one if WDC_IDENTIFY fails.
- For known PCI chips, don't use the wdcprobe() heuristic to find wether
  a channel is enabled/disabled; use the chip's specific registers for this.
- Clear the command queue when we have a polled command. This allows dumps to
  work even if a command was being handled by the controller at panic time.
- Increase the number of available DMA segments by one, as user requests may
  not be aligned on a page boundary.

Revision 1.175.2.9: download - view: text, markup, annotated - select for diffs
Fri Sep 11 16:23:12 1998 UTC (28 years, 2 months ago) by bouyer
Branches: bouyer-ide
Diff to: previous 1.175.2.8: preferred, colored
Changes since revision 1.175.2.8: +5 -2 lines
Sync with HEAD.

Revision 1.180: download - view: text, markup, annotated - select for diffs
Mon Sep 7 21:28:22 1998 UTC (28 years, 2 months ago) by drochner
Branches: MAIN
CVS tags: bouyer-ide-base
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +3 -3 lines
make the default disklabel consistent to the SCSI/ATAPI case

Revision 1.175.2.8: download - view: text, markup, annotated - select for diffs
Fri Aug 21 16:34:46 1998 UTC (28 years, 3 months ago) by bouyer
Branches: bouyer-ide
Diff to: previous 1.175.2.7: preferred, colored
Changes since revision 1.175.2.7: +33 -26 lines
Sync with -current

Revision 1.179: download - view: text, markup, annotated - select for diffs
Sat Aug 15 15:05:22 1998 UTC (28 years, 3 months ago) by rvb
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +8 -6 lines
Use scsi style geometry printout

Revision 1.178: download - view: text, markup, annotated - select for diffs
Sat Aug 15 10:10:47 1998 UTC (28 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +22 -20 lines
Assign my copyrights to TNF.

Revision 1.177: download - view: text, markup, annotated - select for diffs
Thu Aug 13 18:16:53 1998 UTC (28 years, 3 months ago) by rvb
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +7 -3 lines
Report "true" disk geometry; like sd disks do

Revision 1.175.2.7: download - view: text, markup, annotated - select for diffs
Thu Aug 13 14:27:48 1998 UTC (28 years, 3 months ago) by bouyer
Branches: bouyer-ide
Diff to: previous 1.175.2.6: preferred, colored
Changes since revision 1.175.2.6: +46 -22 lines
 - sync with HEAD
 - better error detection and report for wd drives
 - better wddump() support
 - wdcwait() now takes a timout argument, so that we can honnor the
   timeout argument of scsipi cmds.

Revision 1.175.2.6: download - view: text, markup, annotated - select for diffs
Sat Jun 13 14:26:16 1998 UTC (28 years, 5 months ago) by bouyer
Branches: bouyer-ide
Diff to: previous 1.175.2.5: preferred, colored
Changes since revision 1.175.2.5: +2 -2 lines
Sync with HEAD.

Revision 1.175.2.5: download - view: text, markup, annotated - select for diffs
Wed Jun 10 11:14:34 1998 UTC (28 years, 5 months ago) by bouyer
Branches: bouyer-ide
Diff to: previous 1.175.2.4: preferred, colored
Changes since revision 1.175.2.4: +4 -1 lines
Print the minimum and recomended DMA timings if DEBUG_PROBE is defined.

Revision 1.175.2.4: download - view: text, markup, annotated - select for diffs
Tue Jun 9 12:56:54 1998 UTC (28 years, 5 months ago) by bouyer
Branches: bouyer-ide
Diff to: previous 1.175.2.3: preferred, colored
Changes since revision 1.175.2.3: +1 -16 lines
- sync with trunck
- don't try to set the drive's PIO mode if we don't know how to set it on the
  controller. This seems to confuse some 'intelligent' ISA controllers.

Revision 1.176: download - view: text, markup, annotated - select for diffs
Tue Jun 9 07:35:06 1998 UTC (28 years, 5 months ago) by thorpej
Branches: MAIN
CVS tags: eeh-paddr_t-base, eeh-paddr_t
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +1 -16 lines
Nuke __BROKEN_INDIRECT_CONFIG.

Revision 1.175.2.3: download - view: text, markup, annotated - select for diffs
Fri Jun 5 16:17:47 1998 UTC (28 years, 5 months ago) by bouyer
Branches: bouyer-ide
Diff to: previous 1.175.2.2: preferred, colored
Changes since revision 1.175.2.2: +2 -1 lines
- call wdc_ata_bio_done() only once.
- better error recovery: if an error occured, retry the transfer in
  single sector PIO mode.

Revision 1.175.2.2: download - view: text, markup, annotated - select for diffs
Thu Jun 4 16:52:35 1998 UTC (28 years, 5 months ago) by bouyer
Branches: bouyer-ide
Diff to: previous 1.175.2.1: preferred, colored
Changes since revision 1.175.2.1: +1146 -0 lines
Commit changes to the IDE system in a branch. This allows a better separation
between higth-level and low-level (i.e. registers read/write) and generalize
the queue for all commands. This also add supports for IDE DMA.

Revision 1.175.2.1
Thu Jun 4 02:25:05 1998 UTC (28 years, 5 months ago) by bouyer
Branches: bouyer-ide
FILE REMOVED
Changes since revision 1.175: +0 -1032 lines
file wd.c was added on branch bouyer-ide on 1998-06-04 16:52:35 +0000

Revision 1.175: download - view: text, markup, annotated - select for diffs
Thu Jun 4 02:25:05 1998 UTC (28 years, 5 months ago) by enami
Branches: MAIN
Branch point for: bouyer-ide
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +2 -2 lines
Print newline like others do when tracing wdunlock.

Revision 1.174: download - view: text, markup, annotated - select for diffs
Sat May 9 05:20:35 1998 UTC (28 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +3 -1 lines
Disable the change to check wdp_ataversion, since it's unreliable with old
devices.  (Yuck.)

Revision 1.173: download - view: text, markup, annotated - select for diffs
Sun Apr 26 06:03:23 1998 UTC (28 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +2 -2 lines
Update copyright.

Revision 1.172: download - view: text, markup, annotated - select for diffs
Sun Apr 26 05:28:23 1998 UTC (28 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +39 -19 lines
In LBA mode, always use the `total capacity' count, rather than calculating
the capacity based on the c/h/s numbers.  In fact, don't use the c/h/s
numbers for much of anything.
For ATA-4 drives or later, always use LBA mode, since it's now required.

Collectively, this allows >8GB disks (like the 12GB Bigfoot) to work.

Revision 1.171: download - view: text, markup, annotated - select for diffs
Thu Apr 23 13:30:39 1998 UTC (28 years, 7 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +5 -4 lines
From Robert V. Baron:
Compute the disk block addr at command queing time rather than exec time.
This fix a bug which could lead to data corruption on disk: when a command
was reexecuted after an error condition (from wdcunwedge), the partition
offset was re-added to the block addr, leading to a transfert at the wrong
disk block.
This should fix the problem reported by some laptop's users, where the
first disk read after a suspend/resume returned garbage.

Revision 1.170: download - view: text, markup, annotated - select for diffs
Wed Mar 25 09:58:24 1998 UTC (28 years, 7 months ago) by leo
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +11 -3 lines
Conditionalize badblock handling on 'HAS_BAD144_HANDLING'. Some ports
(like atari) do not support it.

Revision 1.169: download - view: text, markup, annotated - select for diffs
Thu Jan 15 01:26:13 1998 UTC (28 years, 10 months ago) by cgd
Branches: MAIN
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +1 -7 lines
kill a couple of unnecessary #ifs

Revision 1.168: download - view: text, markup, annotated - select for diffs
Wed Jan 14 23:41:59 1998 UTC (28 years, 10 months ago) by cgd
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +37 -12 lines
Various cleanups and bug fixes to the wdc/wd code:
* Fix bug in wdc that would overflow ATAPI transfer length.
* Improve wdc probe code so that 'wdc' is probed in if present
  even if there are no drives attached, and so that it works
  properly even if the only device is an ATAPI slave.
* bus_space-ify.
* split the ISA attachment from the wdc driver, and remove
  ISA dependencies from non-ISA files.
* claim that wd and wdc are now machine-independent (probably not
  completely true, but mostly so; they at least work on arm32 and
  i386).
* Various other minor fixups and cleanups, some of which were pointed
  out by Kazuki Sakamoto.

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

Revision 1.162.2.2: download - view: text, markup, annotated - select for diffs
Tue Oct 14 10:24:04 1997 UTC (29 years, 1 month ago) by thorpej
Diff to: previous 1.162.2.1: preferred, colored; next MAIN 1.163: preferred, colored
Changes since revision 1.162.2.1: +42 -11 lines
Update marc-pcmcia branch from trunk.

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

o Add declaration to all architectures.

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

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

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

Revision 1.162.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 27 23:32:07 1997 UTC (29 years, 2 months ago) by thorpej
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +227 -1076 lines
Update marc-pcmcia branch from trunk.

Revision 1.163: download - view: text, markup, annotated - select for diffs
Wed Aug 27 11:25:14 1997 UTC (29 years, 2 months ago) by bouyer
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +227 -1076 lines
Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.

Revision 1.162: download - view: text, markup, annotated - select for diffs
Fri Jul 18 00:26:22 1997 UTC (29 years, 4 months ago) by fvdl
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +10 -10 lines
Work around possible race condition with 2 drives on one controller
in wd_get_parms. PR 3773, from Onno van der Linden (onno@simplex.nl)

Revision 1.160.2.3: download - view: text, markup, annotated - select for diffs
Thu Jul 17 17:03:00 1997 UTC (29 years, 4 months ago) by bouyer
Diff to: previous 1.160.2.2: preferred, colored; next MAIN 1.161: preferred, colored
Changes since revision 1.160.2.2: +4 -3 lines
Use "locator.h".

Revision 1.160.2.2: download - view: text, markup, annotated - select for diffs
Thu Jul 17 13:42:46 1997 UTC (29 years, 4 months ago) by bouyer
Diff to: previous 1.160.2.1: preferred, colored
Changes since revision 1.160.2.1: +3 -2 lines
Update from trunck.

Revision 1.161: download - view: text, markup, annotated - select for diffs
Thu Jul 17 00:58:52 1997 UTC (29 years, 4 months ago) by jtk
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +3 -2 lines
use locator defines in "locators.h" to index cf_loc[]

still to be done and/or decided not to be done: replace all *UNK uses in
isa code with the native names from locators.h

Revision 1.160.2.1: download - view: text, markup, annotated - select for diffs
Tue Jul 1 17:47:13 1997 UTC (29 years, 4 months ago) by bouyer
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +224 -1074 lines
Add the ide atapi driver from my original atapi driver, ported
to scsipi.

Revision 1.160: download - view: text, markup, annotated - select for diffs
Tue Jun 24 00:20:44 1997 UTC (29 years, 5 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +3 -2 lines
foosize()'s return value is in DEV_BSIZE units; adjust the size obtained
from the disklabel accordingly.

Revision 1.159: download - view: text, markup, annotated - select for diffs
Wed Jun 18 22:17:14 1997 UTC (29 years, 5 months ago) by pk
Branches: MAIN
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +1 -2 lines
Remove spurious line left over in previous commit.

Revision 1.158: download - view: text, markup, annotated - select for diffs
Wed Jun 18 20:39:55 1997 UTC (29 years, 5 months ago) by pk
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +18 -9 lines
wdsize(): only call wdopen()/wdclose() if not already open, per the
current `openmask'.

Revision 1.157: download - view: text, markup, annotated - select for diffs
Fri Jun 6 23:44:06 1997 UTC (29 years, 5 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +18 -9 lines
Pull thorpej-bus-dma branch into mainline.

Revision 1.156.6.1: download - view: text, markup, annotated - select for diffs
Tue May 13 03:39:46 1997 UTC (29 years, 6 months ago) by thorpej
Diff to: previous 1.156: preferred, colored; next MAIN 1.157: preferred, colored
Changes since revision 1.156: +18 -9 lines
Adapt to new software interface to the on-board ISA DMA controller.

Revision 1.156: download - view: text, markup, annotated - select for diffs
Fri Jan 17 20:45:29 1997 UTC (29 years, 10 months ago) by perry
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +21 -14 lines
Fixes to wd driver from cgd -- corrects several nasty bugs typically
associated with coming out of suspends/sleeps on laptops.
Approved by fvdl.

Revision 1.155: download - view: text, markup, annotated - select for diffs
Wed Nov 27 10:50:39 1996 UTC (29 years, 11 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +6 -6 lines
In wdattach(), when printing out info about the drive, make the output
look a little more like a SCSI disk's.  This has the pleasant side-effect
of preventing the output from annoyingly extending past 80 columns.

Revision 1.154: download - view: text, markup, annotated - select for diffs
Thu Nov 7 05:23:07 1996 UTC (30 years ago) by mikel
Branches: MAIN
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +7 -6 lines
Fix WDDEBUG code; PR kern/1480.

Revision 1.153: download - view: text, markup, annotated - select for diffs
Sun Oct 13 01:38:04 1996 UTC (30 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +22 -22 lines
backout kprintf changes

Revision 1.152: download - view: text, markup, annotated - select for diffs
Thu Oct 10 22:05:16 1996 UTC (30 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +22 -22 lines
printf -> kprintf, sprintf -> ksprintf

Revision 1.151: download - view: text, markup, annotated - select for diffs
Tue Aug 27 21:59:37 1996 UTC (30 years, 2 months ago) by cgd
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +3 -3 lines
change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).

Revision 1.150: download - view: text, markup, annotated - select for diffs
Sun May 12 23:54:03 1996 UTC (30 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +2 -1 lines
Use intr.h.

Revision 1.149: download - view: text, markup, annotated - select for diffs
Mon Apr 29 19:50:47 1996 UTC (30 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +52 -31 lines
- gcc -Wall fixes

Revision 1.148: download - view: text, markup, annotated - select for diffs
Thu Apr 11 22:30:31 1996 UTC (30 years, 7 months ago) by cgd
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +3 -3 lines
update for addition of a machine-dependent cookie as the first argument
to isa_intr_{,dis}establish().

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

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

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

Revision 1.146: download - view: text, markup, annotated - select for diffs
Fri Mar 1 04:08:51 1996 UTC (30 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +6 -4 lines
Add support to the ISA DMA framework for auto-initialize mode.
Add experimental SB16 code, disabled for now.

Revision 1.145: download - view: text, markup, annotated - select for diffs
Mon Jan 8 21:21:56 1996 UTC (30 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +14 -7 lines
Make sure we disk_busy() for every transfer we start.

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

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

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

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

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

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

Revision 1.143: download - view: text, markup, annotated - select for diffs
Sun Dec 24 02:31:59 1995 UTC (30 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +3 -3 lines
The IST_* and IPL_* constants are not bus-specific; don't treat them as such.
Change splimp -> splnet in Ethernet, ARCnet, and FDDI drivers.

Revision 1.142: download - view: text, markup, annotated - select for diffs
Sat Aug 5 23:50:23 1995 UTC (31 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +49 -68 lines
Use an intermediate variable to shorten label initialization code.
Make wddump() work on more machines.

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

Revision 1.140: download - view: text, markup, annotated - select for diffs
Mon Jun 26 05:18:28 1995 UTC (31 years, 4 months ago) by cgd
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +103 -72 lines
implement new-style block device dump routine if __BDEVSW_DUMP_OLD_TYPE
not defined, otherwise use an "not implemented" stub.

Revision 1.139: download - view: text, markup, annotated - select for diffs
Mon Apr 17 12:09:31 1995 UTC (31 years, 7 months ago) by cgd
Branches: MAIN
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +9 -10 lines
clean up several ISA device interfaces: autoconfiguration, header
inclusion, and interrupt configuration.  more work still needs to be done,
but it's getting better...

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

Revision 1.137: download - view: text, markup, annotated - select for diffs
Mon Apr 10 16:53:06 1995 UTC (31 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +2 -2 lines
kernel_pmap --> pmap_kernel()

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

Revision 1.135: download - view: text, markup, annotated - select for diffs
Wed Mar 29 23:36:27 1995 UTC (31 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +196 -238 lines
Revamp the locking mechanism slightly.  Update some outdated comments, and add
a few new ones.

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

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

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

Revision 1.131: download - view: text, markup, annotated - select for diffs
Mon Feb 27 01:08:01 1995 UTC (31 years, 8 months ago) by cgd
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +2 -2 lines
use wdc_softc in wdccd, rather than wd_softc; from chuck cranor. (pr 828)

Revision 1.130: download - view: text, markup, annotated - select for diffs
Sun Jan 29 07:37:15 1995 UTC (31 years, 9 months ago) by cgd
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +2 -2 lines
lip service to making ISA support machine-independent.  This is the first
round: moving the drivers into a machine-independent directory.
Some drivers (e.g. fd.c) not moved because they use other pc features (e.g.
CMOS settings), and none of the non-driver files moved, because they're
still pretty much PC specific.  eventually (when other ports with ISA
busses really start using this code), more 'high-level' ISA support will
live here.

Revision 1.129: download - view: text, markup, annotated - select for diffs
Fri Jan 13 12:30:59 1995 UTC (31 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +39 -31 lines
(Almost) allow sector sizes other than 512 bytes.  Reduce some expensive operations.

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

Revision 1.127: download - view: text, markup, annotated - select for diffs
Fri Jan 13 10:22:58 1995 UTC (31 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +2 -3 lines
Fix another bug in the DMA code.

Revision 1.126: download - view: text, markup, annotated - select for diffs
Fri Jan 13 09:40:21 1995 UTC (31 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +24 -21 lines
Minor rearrangement.

Revision 1.125: download - view: text, markup, annotated - select for diffs
Fri Jan 13 08:58:16 1995 UTC (31 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +31 -29 lines
Change the way sc_skip is used.  Fix a bug in the (incomplete) DMA code.  Add a
new sc_blkno (which will be useful later).

Revision 1.124: download - view: text, markup, annotated - select for diffs
Sat Jan 7 03:07:22 1995 UTC (31 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +40 -8 lines
Fix a race condition between normal I/O and wd_get_parms().

Revision 1.123: download - view: text, markup, annotated - select for diffs
Tue Jan 3 01:31:10 1995 UTC (31 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +2 -2 lines
Add interrupt sharing types.

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

Revision 1.121: download - view: text, markup, annotated - select for diffs
Thu Dec 1 10:45:26 1994 UTC (31 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +2 -2 lines
Ignore ERR during diagnostics.

Revision 1.120: download - view: text, markup, annotated - select for diffs
Wed Nov 30 02:32:03 1994 UTC (31 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +9 -5 lines
Clear the controller active flag after a timeout.

Revision 1.119: download - view: text, markup, annotated - select for diffs
Wed Nov 23 22:00:08 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +4 -1 lines
Officially credit Onno.

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

Revision 1.117: download - view: text, markup, annotated - select for diffs
Wed Nov 23 03:11:01 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +9 -13 lines
Fix an outdated comment.

Revision 1.116: download - view: text, markup, annotated - select for diffs
Wed Nov 23 01:35:43 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +100 -89 lines
Use logical block addressing if available.  Be a little more careful about
maintaining timeouts.  Clean up wddump() a bit.

Revision 1.115: download - view: text, markup, annotated - select for diffs
Tue Nov 22 10:20:16 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +21 -10 lines
Implement 32-bit reads and writes, but for now assume 16-bit mode.

Revision 1.114: download - view: text, markup, annotated - select for diffs
Tue Nov 22 09:36:56 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +4 -3 lines
Add a missing newline in some error messages.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Tue Nov 22 09:33:59 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +160 -133 lines
Implement EIDE multi-sector PIO and DMA modes, based on code from Onno van
der Linden.  Also, various structural cleanup, and fix two bogons that crept
in, and remove all of the old clustering nonsense.

Revision 1.112: download - view: text, markup, annotated - select for diffs
Tue Nov 22 05:50:48 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +2 -2 lines
Minor fix to debugging code.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Tue Nov 22 05:39:16 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +3 -1 lines
Fudge a couple more fields for ancient disks.

Revision 1.110: download - view: text, markup, annotated - select for diffs
Tue Nov 22 05:34:49 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +31 -27 lines
Change some constant names, etc., to better match the ATA spec.

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

Revision 1.108: download - view: text, markup, annotated - select for diffs
Sun Nov 20 22:37:07 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +200 -158 lines
Add some missing locking, and some general cleanup.

Revision 1.107: download - view: text, markup, annotated - select for diffs
Fri Nov 18 22:03:47 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +7 -7 lines
Convert port, IRQ, and DRQ numbers to ints.

Revision 1.106: download - view: text, markup, annotated - select for diffs
Fri Nov 4 23:30:15 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +7 -5 lines
Fix stupid bug in last change.

Revision 1.105: download - view: text, markup, annotated - select for diffs
Fri Nov 4 23:18:06 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +60 -58 lines
Add a simplified version of wdcommand() that can be used in some cases.
Avoid needing a wd_softc inside wdprobe().

Revision 1.104: download - view: text, markup, annotated - select for diffs
Fri Nov 4 19:02:06 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +1 -2 lines
No longer needs icu.h.

Revision 1.103: download - view: text, markup, annotated - select for diffs
Thu Nov 3 23:23:44 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +4 -5 lines
*intr() arg does not need to be void*.

Revision 1.102: download - view: text, markup, annotated - select for diffs
Thu Nov 3 22:56:06 1994 UTC (32 years ago) by mycroft
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +28 -31 lines
Use indirect config for subdevices, and add dkdrivers where missing.

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

Revision 1.100: download - view: text, markup, annotated - select for diffs
Thu Oct 27 04:18:26 1994 UTC (32 years ago) by cgd
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +3 -2 lines
new RCS ID format.

Revision 1.99: download - view: text, markup, annotated - select for diffs
Thu Oct 20 19:22:01 1994 UTC (32 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +5 -2 lines
Be careful not to stack multiple timeouts.

Revision 1.98: download - view: text, markup, annotated - select for diffs
Thu Oct 20 18:37:45 1994 UTC (32 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +23 -24 lines
Remove the local timeout mechanism, and just use explicit timeout()/untimeout()
calls.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Thu Oct 20 17:03:09 1994 UTC (32 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +2 -1 lines
Always set d_secsize to 512 for now.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Thu Oct 20 16:36:21 1994 UTC (32 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +16 -18 lines
Don't switch to single-sector mode just because we got a corrected error.

Revision 1.95: download - view: text, markup, annotated - select for diffs
Thu Oct 20 16:19:08 1994 UTC (32 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +96 -102 lines
Rearrange wdcstart() in a more logical fashion, and eliminate many redundant
calculations.  Also, speed up bad block searching a little.

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

Revision 1.93: download - view: text, markup, annotated - select for diffs
Thu Oct 20 13:44:46 1994 UTC (32 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +153 -141 lines
Various changes:
* Add a dkdevice; move sc_*openpart, sc_label, and sc_cpulabel into it.
* Turn sc_wlabel into a flag, and don't set it automatically in DIOCWLABEL.
* If there is no label, disallow all I/O except to the raw partition.
* Don't allow I/O to `unused' partitions.
* Beginnings of support for block sizes other than 512 bytes.
Other minor changes.

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

Revision 1.84.2.7: download - view: text, markup, annotated - select for diffs
Tue Oct 11 09:46:48 1994 UTC (32 years, 1 month ago) by mycroft
Diff to: previous 1.84.2.6: preferred, colored; next MAIN 1.85: preferred, colored
Changes since revision 1.84.2.6: +1 -2 lines
Update from trunk.

Revision 1.91: download - view: text, markup, annotated - select for diffs
Sun Oct 9 15:06:26 1994 UTC (32 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +1 -2 lines
Remove unneeded #includes.

Revision 1.84.2.6: download - view: text, markup, annotated - select for diffs
Fri Oct 7 11:35:28 1994 UTC (32 years, 1 month ago) by mycroft
Diff to: previous 1.84.2.5: preferred, colored
Changes since revision 1.84.2.5: +3 -5 lines
Update from trunk.

Revision 1.90: download - view: text, markup, annotated - select for diffs
Fri Oct 7 11:34:52 1994 UTC (32 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +3 -5 lines
Don't poll the BUSY bit until the SDH register is set.

Revision 1.84.2.5: download - view: text, markup, annotated - select for diffs
Mon Sep 12 20:38:08 1994 UTC (32 years, 2 months ago) by cgd
Diff to: previous 1.84.2.4: preferred, colored
Changes since revision 1.84.2.4: +2 -2 lines
from trunk.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Mon Sep 12 20:29:08 1994 UTC (32 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +2 -2 lines
Turn off the delay debugging messages again.

Revision 1.84.2.4: download - view: text, markup, annotated - select for diffs
Mon Aug 15 14:50:55 1994 UTC (32 years, 3 months ago) by mycroft
Diff to: previous 1.84.2.3: preferred, colored
Changes since revision 1.84.2.3: +3 -3 lines
update from trunk

Revision 1.88: download - view: text, markup, annotated - select for diffs
Mon Aug 15 14:50:33 1994 UTC (32 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +3 -3 lines
Eliminate struct pte and struct pde.

Revision 1.84.2.3: download - view: text, markup, annotated - select for diffs
Mon Aug 15 08:22:41 1994 UTC (32 years, 3 months ago) by mycroft
Diff to: previous 1.84.2.2: preferred, colored
Changes since revision 1.84.2.2: +21 -14 lines
update from trunk

Revision 1.87: download - view: text, markup, annotated - select for diffs
Mon Aug 15 08:22:20 1994 UTC (32 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +20 -13 lines
Don't use altsts.  Sigh.

Revision 1.84.2.2: download - view: text, markup, annotated - select for diffs
Tue Jul 26 19:54:28 1994 UTC (32 years, 3 months ago) by cgd
Diff to: previous 1.84.2.1: preferred, colored
Changes since revision 1.84.2.1: +24 -19 lines
update from trunk.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Tue Jul 26 19:36:13 1994 UTC (32 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +24 -19 lines
Normalize label handling.

Revision 1.84.2.1: download - view: text, markup, annotated - select for diffs
Fri Jul 22 01:26:12 1994 UTC (32 years, 4 months ago) by cgd
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +6 -4 lines
from trunk.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Thu Jul 21 23:44:16 1994 UTC (32 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +6 -4 lines
Return EINVAL if the requested transfer size is weird.

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

Revision 1.83: download - view: text, markup, annotated - select for diffs
Thu Jun 9 20:00:13 1994 UTC (32 years, 5 months ago) by pk
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +2 -1 lines
Set `uio_procp' field in case we ever need it.

Revision 1.82: download - view: text, markup, annotated - select for diffs
Thu May 5 08:31:00 1994 UTC (32 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +3 -3 lines
Remove now-bogus casts.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Thu May 5 05:37:05 1994 UTC (32 years, 6 months ago) by cgd
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +11 -9 lines
lots of changes: prototype migration, move lots of variables, definitions,
and structure elements around.  kill some unnecessary type and macro
definitions.  standardize clock handling.  More changes than you'd want.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Mon Apr 25 03:16:03 1994 UTC (32 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +7 -5 lines
Fix uninitialized pointer, pointed out by Michael VanLoon.

Revision 1.79: download - view: text, markup, annotated - select for diffs
Sun Apr 24 01:30:04 1994 UTC (32 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +1 -2 lines
Don't need isa.h.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Wed Apr 20 07:23:54 1994 UTC (32 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +55 -66 lines
Use TAILQ_*() to maintain the drive activation queues.

Revision 1.77: download - view: text, markup, annotated - select for diffs
Sat Apr 9 03:43:36 1994 UTC (32 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +2 -4 lines
Don't print a duplicate message about stray interrupts.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Thu Apr 7 06:51:17 1994 UTC (32 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +17 -11 lines
Implement dynamic IRQ configuration and IRQ sharing.  Inline spl*() calls.
Reorganize and clean up the relevant code.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Wed Mar 30 04:58:32 1994 UTC (32 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +2 -2 lines
Turn off the timeout debugging info by default.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Tue Mar 29 04:36:30 1994 UTC (32 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +101 -98 lines
Updates for new autoconfig.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Sat Mar 12 22:36:40 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +3 -3 lines
Prefix the busy-wait messages with `ignore this:' so people stop reporting
it as a bug.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Sat Mar 12 22:32:48 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +15 -7 lines
Fix problem with reading the disk label if it's not at the beginning of the
disk.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Sat Mar 12 03:45:08 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +1 -10 lines
Remove backward compatibility hacks for config(8), as they are no longer
useful.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Sat Mar 12 03:41:13 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +2 -5 lines
Update to match config(8).

Revision 1.69: download - view: text, markup, annotated - select for diffs
Fri Mar 11 23:29:12 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +88 -65 lines
Various:
Put WDF_ERROR in the wdc_softc, to avoid gratuitously forcing non-active drives
into single-sector mode on the next transfer.  Arrange to wait for an interrupt
after wdsetctlr(); this avoids long busy-wait delays, and gets rid of the
`extra interrupt' messages (except for one immediately after autoconfig on some
machines).  Replace some uses of wdsetctlr() with simply lowering wd->sc_state;
no point in forcing this immediately.  Allow control operations to time out.
Enable the warnings for long busy-wait delays by default.  Some other minor
things not worth mentioning.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Thu Mar 10 22:30:09 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +11 -1 lines
Add a heuristic for detecting old config(8)s.  This is very temporary.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Thu Mar 10 21:52:10 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +3 -1 lines
Now that the disk probe routines are actually called, they need to return
something.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Thu Mar 10 20:05:32 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +16 -4 lines
More updates for new config.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Thu Mar 10 19:57:20 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +21 -19 lines
Update for new config.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Thu Mar 10 05:18:33 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +696 -656 lines
Cleanup to fit standard coding conventions, and *many* bugs fixed.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Mon Mar 7 05:54:44 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +91 -101 lines
Some changes inspired by Bruce Evans's driver:
Consolidate error reporting in one function.  Actually use the dk_status and
dk_error fields, and pass around only the error bit to avoid lots of unneeded
assignments and tests.  No functional differences.

Revision 1.62: download - view: text, markup, annotated - select for diffs
Mon Mar 7 03:18:35 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +23 -37 lines
Remove DKFL_QUIET.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Sun Mar 6 17:19:19 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +4 -4 lines
DELAY() --> delay().  This is not a macro.

Revision 1.60: download - view: text, markup, annotated - select for diffs
Sat Mar 5 08:17:06 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +132 -206 lines
Move the drive select and various other things into wdcommand(), to avoid
duplicating code.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Fri Mar 4 23:43:14 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +4 -1 lines
Make sure we clear the interrupt when necessary.  Why this isn't needed on
my hardware is a mystery.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Fri Mar 4 17:51:10 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +2 -1 lines
Add another missing splx().

Revision 1.57: download - view: text, markup, annotated - select for diffs
Fri Mar 4 17:45:22 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +8 -7 lines
Remember to splx() on some error conditions.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Fri Mar 4 04:15:24 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +31 -33 lines
Start the timeout loop *after* we've decided there is a disk there.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Fri Mar 4 03:43:48 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +133 -120 lines
De-ANSIfy.  Move the timeout counter into struct disk.  Remove unneeded args
to wd[gs]etctlr().  Other minor changes.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Thu Mar 3 01:58:21 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +76 -90 lines
Watch `seek complete' bit per IBM documentation.  Clean up wdioctl().  Other
minor cleanup.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Wed Mar 2 23:27:13 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +7 -5 lines
Be more careful about clearing the controller and drive active flags.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Wed Mar 2 22:07:00 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +4 -3 lines
Don't busy-wait for read or write completion.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Wed Mar 2 21:42:31 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +151 -134 lines
Make wdc_wait() do an implicit wait_for_unbusy().  Pass structure pointers
rahter than unit numbers where appropriate.  Fix conflict if two drives have
I/O pending at the same time.  Add some more sanity checks.  Some other minor
cleanup.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Sat Feb 26 19:49:25 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +8 -6 lines
Get the residual count right.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sat Feb 26 19:00:51 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +36 -20 lines
Clean up busy-wait code a little, and we need a special disksort() to skip
over bufs in a combined transfer.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sat Feb 26 17:59:46 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +3 -6 lines
Fix bug from 1.43 correctly.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sat Feb 26 17:13:44 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +2 -2 lines
Fix typo.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sat Feb 26 17:10:12 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +46 -59 lines
Various cleanup, and fix last night's bug.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sat Feb 26 00:08:01 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +2 -2 lines
Fix typo.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Sat Feb 26 00:00:17 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +51 -50 lines
Some more stylistic cleanup.

Revision 1.43: download - view: text, markup, annotated - select for diffs
Fri Feb 25 18:30:37 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +7 -5 lines
Fix an obvious bug that could stall the queue.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Fri Feb 25 18:17:30 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +4 -29 lines
Remove some redundant code.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Fri Feb 25 18:08:21 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +8 -8 lines
Increase polling delay.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Fri Feb 25 17:45:28 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +61 -134 lines
Generalize busy-wait loops.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Fri Feb 25 16:54:41 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +1 -13 lines
Don't bother #ifdefing things that are needed and always enabled.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri Feb 25 16:43:48 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +5 -88 lines
Don't reimplement disksort().

Revision 1.37: download - view: text, markup, annotated - select for diffs
Fri Feb 25 16:40:47 1994 UTC (32 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +248 -260 lines
`We are the KNF.  You will be assimilated.'

Revision 1.36: download - view: text, markup, annotated - select for diffs
Thu Feb 10 15:17:34 1994 UTC (32 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +5 -11 lines
Back pointers are not useful for disksort().

Revision 1.35: download - view: text, markup, annotated - select for diffs
Wed Feb 9 21:13:56 1994 UTC (32 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +2 -2 lines
All ioctl routines take a struct proc * now.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sun Feb 6 17:46:06 1994 UTC (32 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +13 -9 lines
Remove another use of b_actl.

Revision 1.26.2.5: download - view: text, markup, annotated - select for diffs
Sun Feb 6 10:08:34 1994 UTC (32 years, 9 months ago) by mycroft
Diff to: previous 1.26.2.4: preferred, colored; next MAIN 1.27: preferred, colored
Changes since revision 1.26.2.4: +19 -19 lines
Use b_actf, not av_forw.

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

Revision 1.32: download - view: text, markup, annotated - select for diffs
Mon Jan 3 16:23:06 1994 UTC (32 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +2 -1 lines
Inline all the [lr]cr[023]() `functions' in cpufunc.h.

Revision 1.31: download - view: text, markup, annotated - select for diffs
Mon Jan 3 16:22:18 1994 UTC (32 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +2 -2 lines
Inline all the [lr]cr[023]() `functions' in cpufunc.h.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Fri Dec 24 13:56:14 1993 UTC (32 years, 11 months ago) by ws
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +8 -2 lines
Correct dumping to WD (was destroyed by MACHINE_NONCONTIG code)

Revision 1.29: download - view: text, markup, annotated - select for diffs
Mon Dec 20 09:06:50 1993 UTC (32 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +24 -20 lines
Canonicalize all #includes, and add pio.h where appropriate.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Thu Dec 16 20:22:56 1993 UTC (32 years, 11 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -4 lines
Eliminate reference to Maxmem.

Revision 1.26.2.4: download - view: text, markup, annotated - select for diffs
Mon Dec 13 10:35:10 1993 UTC (32 years, 11 months ago) by cgd
Diff to: previous 1.26.2.3: preferred, colored
Changes since revision 1.26.2.3: +62 -15 lines
partial (hopefully correct) update from trunk

Revision 1.27: download - view: text, markup, annotated - select for diffs
Mon Dec 13 10:16:56 1993 UTC (32 years, 11 months ago) by cgd
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +73 -20 lines
from Soeren Schmidt <sos@login.dkuug.dk>:
Basically it does a timeout on lost interrupts, starting the operation
again and logging and error message on the console.
additionally fixes some of the (newer ending) while loops
(that made it work with two IDE disks !)

Revision 1.26.2.3: download - view: text, markup, annotated - select for diffs
Wed Oct 27 05:38:03 1993 UTC (33 years ago) by mycroft
Diff to: previous 1.26.2.2: preferred, colored
Changes since revision 1.26.2.2: +10 -15 lines
Minor cleanup.

Revision 1.26.2.2: download - view: text, markup, annotated - select for diffs
Fri Sep 24 08:49:31 1993 UTC (33 years, 2 months ago) by mycroft
Diff to: previous 1.26.2.1: preferred, colored
Changes since revision 1.26.2.1: +312 -289 lines
clock.c: Finish conversion.  Make rtcput() work if VRT bit not set.  Speed up
time conversion in delay().
fd.c: Minor changes to autoconfig.  Use dv_parent rather than storing another
pointer to the fdc_softc in each fd_softc.  Change disk label stuff for our
kernel.
icu.s: Make splx() and splnone() return previous cpl for now.
isa.c: Minor autoconfig changes.
isa.h: rtcin() is now nvram() and is declare in nvram.h.  Make isaphysmem a
caddr_t.
pccons.c: XXXX: Maybe we should insist they open /dev/io now.
timerreg.h: #define TIMER_NPORTS.
wd.c: Delete unused wdnoreloc() and wddospart(), and use remaining two bits in
unit number.  struct disk --> struct wd_softc.  struct board --> struct
wdc_softc.  Still needs much work.

Revision 1.26.2.1: download - view: text, markup, annotated - select for diffs
Tue Sep 14 17:32:52 1993 UTC (33 years, 2 months ago) by mycroft
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +77 -159 lines
New i386 code.

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

Revision 1.25: download - view: text, markup, annotated - select for diffs
Wed Jul 28 02:21:37 1993 UTC (33 years, 3 months ago) by cgd
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -2 lines
incorporate changes from 0-9-base to 0-9-ALPHA

Revision 1.24.2.3: download - view: text, markup, annotated - select for diffs
Wed Jul 28 00:11:28 1993 UTC (33 years, 3 months ago) by deraadt
Diff to: previous 1.24.2.2: preferred, colored; next MAIN 1.25: preferred, colored
Changes since revision 1.24.2.2: +17 -2 lines
wd.c: fixes 1 drive systems
fd.c: improves reliability
changes from wolfgang

Revision 1.24.2.2: download - view: text, markup, annotated - select for diffs
Thu Jul 22 11:04:10 1993 UTC (33 years, 4 months ago) by cgd
Diff to: previous 1.24.2.1: preferred, colored
Changes since revision 1.24.2.1: +2 -2 lines
fix comment for previous commit...

Revision 1.24.2.1: download - view: text, markup, annotated - select for diffs
Tue Jul 20 02:08:14 1993 UTC (33 years, 4 months ago) by cgd
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -2 lines
change WDCNDELAY to 400000 -- delay -> 10s, at theo's request

Revision 1.24: download - view: text, markup, annotated - select for diffs
Thu Jul 8 08:22:17 1993 UTC (33 years, 4 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +2 -2 lines
documentation error

Revision 1.23: download - view: text, markup, annotated - select for diffs
Wed Jul 7 05:50:35 1993 UTC (33 years, 4 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +49 -2 lines
added a timeout debugging mode to wd.c so that people can see how slow
their controllers really are. Look for the WDCNDELAY_DEBUG definition.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Wed Jul 7 01:05:42 1993 UTC (33 years, 4 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +2 -2 lines
ok, 5 second command timeouts..

Revision 1.21: download - view: text, markup, annotated - select for diffs
Tue Jul 6 00:42:43 1993 UTC (33 years, 4 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +87 -138 lines
number of changes:
1. controller reset code moved into one function, called from more places now.
2. more places now do timeouts. TIPCAT code turned on.
3. blew away the unused WDOPENLOCK test code.
4. delay is now done using WDCNDELAY repetitions of DELAY(25). Up to 2.5 second
   pause accepted from controller (some controllers have some commands that are
   actually this slow)
5. some of the old timeout code was really whacked.

Revision 1.20: download - view: text, markup, annotated - select for diffs
Mon Jul 5 04:44:48 1993 UTC (33 years, 4 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +3 -2 lines
added a missing {/} pair that barsoom seems to have taken out, but
which the standard 386bsd 0.1 driver did have. This is for a piece of
code in the bad block handling. found/fixed by hpeyerl.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Mon Jul 5 03:20:57 1993 UTC (33 years, 4 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +72 -21 lines
all timeout code now calls DELAY() so the timeout delays are the same
length on all processors. Where possible, the controller is reset if it
times out.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Mon Jul 5 00:08:27 1993 UTC (33 years, 4 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -2 lines
increased the timeout inside wdcommand(). Some controllers impliment some
commands very slowly.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri Jun 18 20:45:35 1993 UTC (33 years, 5 months ago) by cgd
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +1 -12 lines
fix the divide-by-zero problem w/old disks.  this patch is ws's "fault."

Revision 1.16: download - view: text, markup, annotated - select for diffs
Fri May 28 09:10:57 1993 UTC (33 years, 5 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +9 -5 lines
1. It is now possible to build a kernel that does not have a pc0 device driver.
2. "press any key to reboot" reads the key from the console.
3. wddump() still needs a non-blocking getc() routine (or flush)

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sat May 22 08:01:43 1993 UTC (33 years, 6 months ago) by cgd
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -1 lines
add rcsids to everything and clean up headers

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

Revision 1.13: download - view: text, markup, annotated - select for diffs
Mon May 10 05:53:22 1993 UTC (33 years, 6 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +66 -54 lines
This patch allows the wd device driver to tell how big the disks are on
WD1007-derived controllers. In this example, wdc0 is a WD1007-clone,
and wdc1 is a WD1003-clone. WD1007 controllers are generally ESDI
and IDE controllers.
wdc0 at 0x1f0-0x1f7 irq 14 on isa
wd0 at wdc0 targ 0: 322MB 1224 cyl, 15 head, 36 sec <disktype>
wdc1 at 0x170-0x17f irq 7 on isa
wd2 at wdc1 targ 0: (unknown size) <disktype>

Revision 1.12: download - view: text, markup, annotated - select for diffs
Sun May 9 04:25:48 1993 UTC (33 years, 6 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -2 lines
i thought i deleted this line before!

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

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sun Apr 18 10:03:20 1993 UTC (33 years, 7 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -2 lines
slight code quality improvement. not related to the bug with very
old controllers or disks! :-)

Revision 1.9: download - view: text, markup, annotated - select for diffs
Thu Apr 15 07:52:48 1993 UTC (33 years, 7 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +57 -56 lines
Once more: some changes to the ioconf.c structure. It will now handle
devices hanging off controllers, any kind of controller.
A device on isa0 is called at probe(self), then attach(self)
A controller on isa0 is called at probe(self), then all it's children with
    defined unit numbers are initialized by calling attach(subdev); next all
    subdevices with unit ? are initialized by calling attach(sundev).
Almost all device entry points is now like the vax/sun model (intr being
the weird one)

Revision 1.8: download - view: text, markup, annotated - select for diffs
Thu Apr 15 06:39:00 1993 UTC (33 years, 7 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +24 -5 lines
wd driver would fail on calling wdgetctlr() for older drives and
controllers. New behaviour is that if the standard method fails, try
to recalibrate the drive. Success means the drive exists.  patch by
hpeyerl@novatel.cuc.ab.ca (who owns several of these historical
artifacts)

Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon Apr 12 08:17:37 1993 UTC (33 years, 7 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +6 -4 lines
new scsi subsystem.
changes also in config/mkioconf.c & sys/scsi/*

Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Apr 9 16:25:11 1993 UTC (33 years, 7 months ago) by cgd
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +1 -1 lines
have probe return size of io space on successful return, rather
than simply 1.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Thu Apr 8 08:27:00 1993 UTC (33 years, 7 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +3 -4 lines
dmesg output at boottime now tries to print out information as
soon as it is available. The output looks much more like Sunos.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Apr 6 12:09:55 1993 UTC (33 years, 7 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +2 -2 lines
ripped out a message

Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue Apr 6 10:06:30 1993 UTC (33 years, 7 months ago) by deraadt
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +851 -521 lines
Mod-barsoom wd additions. config program + kernel config files changed too.
fd support had to change slightly too.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Mar 21 18:04:42 1993 UTC (33 years, 8 months ago) by cgd
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +82 -47 lines
after 0.2.2 "stable" patches applied

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (33 years, 8 months ago) by cgd
Branches: WJF-920714
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
initial import of 386bsd-0.1 sources

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Mar 21 09:45:37 1993 UTC (33 years, 8 months ago) by cgd
Branches: MAIN
Initial revision

Diff request

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

Log view options

CVSweb <webmaster@jp.NetBSD.org>