The NetBSD Project

CVS log for src/sys/dev/ic/wdc.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.274.2.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:03:38 2014 UTC (2 months ago) by tls
Branch: tls-maxphys
Changes since 1.274.2.2: +2 -2 lines
Diff to previous 1.274.2.2 (colored) to branchpoint 1.274 (colored) next main 1.275 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.265.2.5 / (download) - annotate - [select for diffs], Thu May 22 11:40:22 2014 UTC (4 months, 4 weeks ago) by yamt
Branch: yamt-pagecache
Changes since 1.265.2.4: +15 -11 lines
Diff to previous 1.265.2.4 (colored) to branchpoint 1.265 (colored) next main 1.266 (colored)

sync with head.

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

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

Revision 1.278.4.1 / (download) - annotate - [select for diffs], Sun May 18 17:45:38 2014 UTC (5 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.278: +4 -4 lines
Diff to previous 1.278 (colored) next main 1.279 (colored)

sync with head

Revision 1.279 / (download) - annotate - [select for diffs], Sun Sep 15 16:08:28 2013 UTC (13 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-base, netbsd-7, HEAD
Changes since 1.278: +4 -4 lines
Diff to previous 1.278 (colored)

Mark potentially unused variables

Revision 1.274.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:20:17 2013 UTC (15 months, 4 weeks ago) by tls
Branch: tls-maxphys
Changes since 1.274.2.1: +3 -3 lines
Diff to previous 1.274.2.1 (colored) to branchpoint 1.274 (colored)

resync from head

Revision 1.278 / (download) - annotate - [select for diffs], Wed Apr 3 17:15:07 2013 UTC (18 months, 2 weeks ago) by bouyer
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900
Branch point for: rmind-smpnet
Changes since 1.277: +3 -3 lines
Diff to previous 1.277 (colored)

Fix kernel dump on ahci controller, by making sure we won't sleep
while dumping:
- introduce ata_delay() which either use delay() or kpause()
  depending on flags. use it in sata_reset_interface() and
  some ahci functions
- kill ATA_NOSLEEP, it was tested but never set. use ATA_POLL instead.
- reduce delay while polling in ahci, to speed up the dump

Should fix PR kern/41095

Revision 1.274.2.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:29:15 2013 UTC (19 months, 3 weeks ago) by tls
Branch: tls-maxphys
Changes since 1.274: +56 -33 lines
Diff to previous 1.274 (colored)

resync with head

Revision 1.277 / (download) - annotate - [select for diffs], Sun Feb 3 20:13:28 2013 UTC (20 months, 2 weeks ago) by jakllsch
Branch: MAIN
CVS Tags: agc-symver-base, agc-symver
Changes since 1.276: +12 -8 lines
Diff to previous 1.276 (colored)

Add argument to wdccommandext() to allow the entire contents of the
device/head register to be specified.  Needed for upcoming port multipler
support in mvsata(4).

Revision 1.265.2.4 / (download) - annotate - [select for diffs], Wed Jan 23 00:06:07 2013 UTC (20 months, 4 weeks ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.265.2.3: +3 -2 lines
Diff to previous 1.265.2.3 (colored) to branchpoint 1.265 (colored)

sync with head

Revision 1.265.2.3 / (download) - annotate - [select for diffs], Wed Jan 16 05:33:15 2013 UTC (21 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.265.2.2: +45 -27 lines
Diff to previous 1.265.2.2 (colored) to branchpoint 1.265 (colored)

sync with (a bit old) head

Revision 1.276 / (download) - annotate - [select for diffs], Wed Dec 19 14:05:29 2012 UTC (22 months ago) by kiyohara
Branch: MAIN
CVS Tags: yamt-pagecache-base8
Changes since 1.275: +3 -2 lines
Diff to previous 1.275 (colored)

Restore spl before continue.

Revision 1.275 / (download) - annotate - [select for diffs], Mon Nov 19 22:22:56 2012 UTC (23 months ago) by rkujawa
Branch: MAIN
CVS Tags: yamt-pagecache-base7
Changes since 1.274: +45 -27 lines
Diff to previous 1.274 (colored)

Introduce WDC_CAPABILITY_NO_AUXCTL flag. For lame controllers that don't
have aux control registers (driver coming soon).

Revision 1.265.2.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:21:11 2012 UTC (23 months, 3 weeks ago) by yamt
Branch: yamt-pagecache
Changes since 1.265.2.1: +86 -77 lines
Diff to previous 1.265.2.1 (colored) to branchpoint 1.265 (colored)

sync with head

Revision 1.274 / (download) - annotate - [select for diffs], Tue Jul 31 15:50:34 2012 UTC (2 years, 2 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.273: +77 -75 lines
Diff to previous 1.273 (colored)

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.273 / (download) - annotate - [select for diffs], Sun Jul 29 18:20:13 2012 UTC (2 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.272: +13 -6 lines
Diff to previous 1.272 (colored)

PR/46599: Onno van der Linden: Don't call bus space commands with 0 len.
Causes the sil 3112 controller to lock up.

Revision 1.272 / (download) - annotate - [select for diffs], Thu Jul 26 20:49:48 2012 UTC (2 years, 2 months ago) by jakllsch
Branch: MAIN
Changes since 1.271: +57 -59 lines
Diff to previous 1.271 (colored)

Revert, with intention of restoring in a less invasive way, the SATA Port
Multiplier code.

ok christos@

Revision 1.271 / (download) - annotate - [select for diffs], Tue Jul 24 14:04:30 2012 UTC (2 years, 2 months ago) by jakllsch
Branch: MAIN
Changes since 1.270: +41 -41 lines
Diff to previous 1.270 (colored)

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.270 / (download) - annotate - [select for diffs], Sun Jul 15 10:55:30 2012 UTC (2 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.269: +43 -43 lines
Diff to previous 1.269 (colored)

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.269 / (download) - annotate - [select for diffs], Mon Jul 2 18:15:47 2012 UTC (2 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.268: +59 -57 lines
Diff to previous 1.268 (colored)

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.265.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:07:37 2012 UTC (2 years, 6 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.265: +75 -34 lines
Diff to previous 1.265 (colored)

sync with head

Revision 1.265.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:34:26 2012 UTC (2 years, 8 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.265: +75 -34 lines
Diff to previous 1.265 (colored) next main 1.266 (colored)

merge to -current.

Revision 1.268 / (download) - annotate - [select for diffs], Tue Jan 24 20:04:08 2012 UTC (2 years, 8 months ago) by jakllsch
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, 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, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, 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
Changes since 1.267: +59 -18 lines
Diff to previous 1.267 (colored)

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.267 / (download) - annotate - [select for diffs], Mon Jan 9 01:01:49 2012 UTC (2 years, 9 months ago) by jakllsch
Branch: MAIN
Changes since 1.266: +13 -13 lines
Diff to previous 1.266 (colored)

Instead of assume that 'features' is 0 in wdccommandext(),
pass it as an argument, as is done for wdccommand().

Revision 1.266 / (download) - annotate - [select for diffs], Sun Dec 4 19:48:36 2011 UTC (2 years, 10 months ago) by jakllsch
Branch: MAIN
Changes since 1.265: +7 -7 lines
Diff to previous 1.265 (colored)

correct some typos in comments, whitespace adjustments

Revision 1.265 / (download) - annotate - [select for diffs], Sun Aug 28 10:21:41 2011 UTC (3 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.264: +7 -9 lines
Diff to previous 1.264 (colored)

Revert previous and fix properly by just removing the #error and a bogus
KASSERT() (these 2 are leftover from the experiments on the fuloong
and were not intended to be commited).

Revision 1.264 / (download) - annotate - [select for diffs], Sun Aug 28 09:32:21 2011 UTC (3 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.263: +11 -11 lines
Diff to previous 1.263 (colored)

Make this compile again without WDC_NO_IDS.

Revision 1.263 / (download) - annotate - [select for diffs], Sat Aug 27 17:05:58 2011 UTC (3 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.262: +52 -18 lines
Diff to previous 1.262 (colored)

The loongon2f+cs5526+jmicron PATA->SATA bridge cause an interresting issue:
1) because the CS5536 is not associated with a x86 CPU, interrupts are not
  ack'ed as it expects so interrupts cannot configured as edge-triggered
  (as is expected for a PCIIDE in compat mode)
2) the PATA->SATA bridge ignores the WDC_IDS (interrupt disable bit) so
  the PATA IRQ line gets asserted when resetting or running some polled
  commands. It also wrongly asserts IRQ when the (nonexistent) slave
  device is selected
2) wouldn't be an issue with edge-triggered interrupt because we would
   get a spurious interrupt and continue operation, a new interrupt only shows
   up when the PATA IRQ line goes low and high again. But because of 1),
   we get an unclearable interrupt instead, and the system loops on the
   interrupt handler.

To workaround this, introduce a WDC_NO_IDS compile option which runs
all polled commands (including reset) at splbio() and without sleeps,
so that the controller's interrupt is effectively disabled and
won't be reenabled before the interrupt can be cleared.

The conditions triggering this problem are speficic enough to handle
this via a compile-time option; no need for a run-time (e.g. a
config(9), device property or callback to disable interrupts) solution.

Revision 1.262 / (download) - annotate - [select for diffs], Sat Aug 13 16:02:48 2011 UTC (3 years, 2 months ago) by jakllsch
Branch: MAIN
Changes since 1.261: +4 -2 lines
Diff to previous 1.261 (colored)

It's hard to get a backtrace after calling a NULL function pointer,
add KASSERT before calling.

Revision 1.253.4.4 / (download) - annotate - [select for diffs], Wed Aug 11 22:53:33 2010 UTC (4 years, 2 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.253.4.3: +3 -3 lines
Diff to previous 1.253.4.3 (colored) to branchpoint 1.253 (colored) next main 1.254 (colored)

sync with head.

Revision 1.260.4.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:26 2010 UTC (4 years, 4 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.260: +3 -3 lines
Diff to previous 1.260 (colored) next main 1.261 (colored)

sync with head

Revision 1.260.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:43:23 2010 UTC (4 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.260: +3 -3 lines
Diff to previous 1.260 (colored) next main 1.261 (colored)

Sync with HEAD.

Revision 1.255.4.1.4.1 / (download) - annotate - [select for diffs], Wed Apr 21 00:27:38 2010 UTC (4 years, 6 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.255.4.1: +24 -13 lines
Diff to previous 1.255.4.1 (colored) next main 1.255.4.2 (colored)

sync to netbsd-5

Revision 1.261 / (download) - annotate - [select for diffs], Sun Mar 28 20:46:18 2010 UTC (4 years, 6 months ago) by snj
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.260: +3 -3 lines
Diff to previous 1.260 (colored)

Spell "enough" properly.

Revision 1.253.4.3 / (download) - annotate - [select for diffs], Thu Mar 11 15:03:36 2010 UTC (4 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.253.4.2: +24 -46 lines
Diff to previous 1.253.4.2 (colored) to branchpoint 1.253 (colored)

sync with head

Revision 1.260 / (download) - annotate - [select for diffs], Thu Nov 12 19:37:17 2009 UTC (4 years, 11 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base, matt-premerge-20091211
Branch point for: uebayasi-xip, rmind-uvmplock
Changes since 1.259: +2 -30 lines
Diff to previous 1.259 (colored)

Remove superfluous activation hook.

Revision 1.259 / (download) - annotate - [select for diffs], Mon Oct 19 18:41:13 2009 UTC (5 years ago) by bouyer
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.258: +2 -7 lines
Diff to previous 1.258 (colored)

Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !

Revision 1.255.4.2 / (download) - annotate - [select for diffs], Sun Oct 18 16:39:13 2009 UTC (5 years ago) by bouyer
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, 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-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
Changes since 1.255.4.1: +24 -13 lines
Diff to previous 1.255.4.1 (colored) to branchpoint 1.255 (colored) next main 1.256 (colored)

Pull up following revision(s) (requested by sborrill in ticket #1074):
	sys/dev/ic/wdc.c: revision 1.258
Commit patch from PR#41926. Confirmed to work by PR submitter on two
controllers as well myself and another on viaide.
Stops errors such as the following when probing SATA drives through
controllers that offer the legacy pciide interface:
viaide1 channel 0: reset failed for drive 0
OK bouyer@

Revision 1.258 / (download) - annotate - [select for diffs], Tue Oct 6 13:45:01 2009 UTC (5 years ago) by sborrill
Branch: MAIN
Changes since 1.257: +24 -13 lines
Diff to previous 1.257 (colored)

Commit patch from PR#41926. Confirmed to work by PR submitter on two
controllers as well myself and another on viaide.

Stops errors such as the following when probing SATA drives through
controllers that offer the legacy pciide interface:
viaide1 channel 0: reset failed for drive 0

OK bouyer@

Revision 1.253.4.2 / (download) - annotate - [select for diffs], Mon May 4 08:12:45 2009 UTC (5 years, 5 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.253.4.1: +3 -3 lines
Diff to previous 1.253.4.1 (colored) to branchpoint 1.253 (colored)

sync with head.

Revision 1.255.2.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:17:56 2009 UTC (5 years, 9 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.255: +6 -6 lines
Diff to previous 1.255 (colored) next main 1.256 (colored)

Sync with HEAD.

Revision 1.252.6.4 / (download) - annotate - [select for diffs], Sat Jan 17 13:28:56 2009 UTC (5 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.252.6.3: +4 -4 lines
Diff to previous 1.252.6.3 (colored) to branchpoint 1.252 (colored) next main 1.253 (colored)

Sync with HEAD.

Revision 1.254.6.2 / (download) - annotate - [select for diffs], Sat Dec 13 01:14:15 2008 UTC (5 years, 10 months ago) by haad
Branch: haad-dm
Changes since 1.254.6.1: +6 -6 lines
Diff to previous 1.254.6.1 (colored) to branchpoint 1.254 (colored) next main 1.255 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.257 / (download) - annotate - [select for diffs], Mon Dec 8 11:23:39 2008 UTC (5 years, 10 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, mjf-devfs2-base, jymxensuspend-base, jym-xensuspend-base, jym-xensuspend, haad-nbase2, haad-dm-base2, haad-dm-base
Changes since 1.256: +3 -3 lines
Diff to previous 1.256 (colored)

Warn about large struct on stack in comment.

Revision 1.255.4.1 / (download) - annotate - [select for diffs], Thu Nov 20 02:45:36 2008 UTC (5 years, 11 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-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: matt-nb5-mips64
Changes since 1.255: +5 -5 lines
Diff to previous 1.255 (colored)

Pull up following revision(s) (requested by bouyer in ticket #67):
	sys/dev/ic/wdc.c: revision 1.256
	sys/dev/ata/ata.c: revision 1.102
	sys/dev/scsipi/atapi_wdc.c: revision 1.109
	sys/dev/ata/atavar.h: revision 1.78
	sys/dev/ata/ata_wdc.c: revision 1.91
cpu_intr_p() doesn't account for software interrupts (e.g. callouts) so
we can't use it here. Rssurect ATACH_TH_RUN, backing out
src/sys/dev/ata/ata.c 1.101
src/sys/dev/ata/ata_wdc.c 1.90
src/sys/dev/ata/atavar.h 1.77
src/sys/dev/ic/wdc.c 1.255
src/sys/dev/scsipi/atapi_wdc.c 1.108
Should fix kern/39927 and kern/39725.

Revision 1.256 / (download) - annotate - [select for diffs], Sun Nov 16 19:31:21 2008 UTC (5 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: ad-audiomp2-base, ad-audiomp2
Changes since 1.255: +3 -3 lines
Diff to previous 1.255 (colored)

cpu_intr_p() doesn't account for software interrupts (e.g. callouts) so
we can't use it here. Rssurect ATACH_TH_RUN, backing out
src/sys/dev/ata/ata.c 1.101
src/sys/dev/ata/ata_wdc.c 1.90
src/sys/dev/ata/atavar.h 1.77
src/sys/dev/ic/wdc.c 1.255
src/sys/dev/scsipi/atapi_wdc.c 1.108
Should fix kern/39927 and kern/39725.

Revision 1.254.6.1 / (download) - annotate - [select for diffs], Sun Oct 19 22:16:27 2008 UTC (6 years ago) by haad
Branch: haad-dm
Changes since 1.254: +5 -5 lines
Diff to previous 1.254 (colored)

Sync with HEAD.

Revision 1.254.2.1 / (download) - annotate - [select for diffs], Fri Oct 10 22:30:58 2008 UTC (6 years ago) by skrll
Branch: wrstuden-revivesa
Changes since 1.254: +5 -5 lines
Diff to previous 1.254 (colored) next main 1.255 (colored)

Sync with HEAD.

Revision 1.252.6.3 / (download) - annotate - [select for diffs], Sun Oct 5 20:11:29 2008 UTC (6 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.252.6.2: +3 -3 lines
Diff to previous 1.252.6.2 (colored) to branchpoint 1.252 (colored)

Sync with HEAD.

Revision 1.255 / (download) - annotate - [select for diffs], Thu Oct 2 21:05:17 2008 UTC (6 years ago) by bouyer
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, netbsd-5-base, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.254: +5 -5 lines
Diff to previous 1.254 (colored)

Kill ATACH_TH_RUN and use cpu_intr_p() instead.

Revision 1.252.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:23:28 2008 UTC (6 years, 4 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.252.6.1: +0 -7 lines
Diff to previous 1.252.6.1 (colored) to branchpoint 1.252 (colored)

Sync with HEAD.

Revision 1.253.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:33:46 2008 UTC (6 years, 5 months ago) by yamt
Branch: yamt-pf42
Changes since 1.253: +2 -9 lines
Diff to previous 1.253 (colored) next main 1.254 (colored)

sync with head.

Revision 1.253.4.1 / (download) - annotate - [select for diffs], Fri May 16 02:24:06 2008 UTC (6 years, 5 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.253: +2 -9 lines
Diff to previous 1.253 (colored)

sync with head.

Revision 1.254 / (download) - annotate - [select for diffs], Mon Apr 28 20:23:51 2008 UTC (6 years, 5 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa, haad-dm
Changes since 1.253: +2 -9 lines
Diff to previous 1.253 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.252.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:42:43 2008 UTC (6 years, 6 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.252: +55 -54 lines
Diff to previous 1.252 (colored)

Sync with HEAD.

Revision 1.224.2.8 / (download) - annotate - [select for diffs], Mon Mar 24 09:38:50 2008 UTC (6 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.224.2.7: +55 -54 lines
Diff to previous 1.224.2.7 (colored) next main 1.225 (colored)

sync with head.

Revision 1.252.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:15:18 2008 UTC (6 years, 6 months ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.252: +55 -54 lines
Diff to previous 1.252 (colored) next main 1.253 (colored)

sync with head.

Revision 1.248.8.2 / (download) - annotate - [select for diffs], Sun Mar 23 02:04:39 2008 UTC (6 years, 7 months ago) by matt
Branch: matt-armv6
Changes since 1.248.8.1: +87 -70 lines
Diff to previous 1.248.8.1 (colored) to branchpoint 1.248 (colored) next main 1.249 (colored)

sync with HEAD

Revision 1.253 / (download) - annotate - [select for diffs], Tue Mar 18 20:46:36 2008 UTC (6 years, 7 months ago) by cube
Branch: 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
Changes since 1.252: +55 -54 lines
Diff to previous 1.252 (colored)

Split device_t and softc for ATA devices, as well as wd(4).  Other
cosmetic changes where appropriate.

Revision 1.249.2.1 / (download) - annotate - [select for diffs], Mon Feb 18 21:05:41 2008 UTC (6 years, 8 months ago) by mjf
Branch: mjf-devfs
Changes since 1.249: +34 -18 lines
Diff to previous 1.249 (colored) next main 1.250 (colored)

Sync with HEAD.

Revision 1.224.2.7 / (download) - annotate - [select for diffs], Mon Feb 4 09:23:25 2008 UTC (6 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.224.2.6: +4 -8 lines
Diff to previous 1.224.2.6 (colored)

sync with head.

Revision 1.252 / (download) - annotate - [select for diffs], Mon Jan 28 18:17:05 2008 UTC (6 years, 8 months ago) by dyoung
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.251: +4 -8 lines
Diff to previous 1.251 (colored)

If something still holds a reference to our scsipi_adapter, do not
warn and complete the detachment, but return EBUSY.

Revision 1.224.2.6 / (download) - annotate - [select for diffs], Mon Jan 21 09:43:11 2008 UTC (6 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.224.2.5: +32 -12 lines
Diff to previous 1.224.2.5 (colored)

sync with head

Revision 1.249.8.2 / (download) - annotate - [select for diffs], Sun Jan 20 17:51:34 2008 UTC (6 years, 9 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.249.8.1: +3 -4 lines
Diff to previous 1.249.8.1 (colored) to branchpoint 1.249 (colored) next main 1.250 (colored)

Sync with HEAD

Revision 1.251 / (download) - annotate - [select for diffs], Sat Jan 19 22:22:14 2008 UTC (6 years, 9 months ago) by dyoung
Branch: MAIN
CVS Tags: bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.250: +5 -6 lines
Diff to previous 1.250 (colored)

In wdcdetach(), if config_detach() fails, get out early.

Revision 1.249.8.1 / (download) - annotate - [select for diffs], Thu Jan 10 23:44:16 2008 UTC (6 years, 9 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.249: +29 -8 lines
Diff to previous 1.249 (colored)

Sync with HEAD

Revision 1.250 / (download) - annotate - [select for diffs], Thu Jan 10 07:44:07 2008 UTC (6 years, 9 months ago) by dyoung
Branch: MAIN
Changes since 1.249: +29 -8 lines
Diff to previous 1.249 (colored)

Let us detach atabus* from wdc*, and wdc* from isa*.

Use device_t, device_private().

Revision 1.248.8.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:27:18 2007 UTC (6 years, 11 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.248: +4 -4 lines
Diff to previous 1.248 (colored)

sync with HEAD

Revision 1.224.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:31:13 2007 UTC (6 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.224.2.4: +4 -4 lines
Diff to previous 1.224.2.4 (colored)

sync with head.

Revision 1.248.6.1 / (download) - annotate - [select for diffs], Fri Oct 26 15:45:06 2007 UTC (6 years, 11 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.248: +4 -4 lines
Diff to previous 1.248 (colored) next main 1.249 (colored)

Sync with HEAD.

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

Revision 1.248.12.1 / (download) - annotate - [select for diffs], Thu Oct 25 22:38:02 2007 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.248: +4 -4 lines
Diff to previous 1.248 (colored) next main 1.249 (colored)

Sync with HEAD.

Revision 1.246.6.5 / (download) - annotate - [select for diffs], Tue Oct 23 20:07:52 2007 UTC (6 years, 11 months ago) by ad
Branch: vmlocking
Changes since 1.246.6.4: +4 -4 lines
Diff to previous 1.246.6.4 (colored) to branchpoint 1.246 (colored) next main 1.247 (colored)

Sync with head.

Revision 1.249 / (download) - annotate - [select for diffs], Fri Oct 19 12:00:04 2007 UTC (7 years ago) by ad
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, matt-armv6-base, jmcneill-pm-base, jmcneill-base, cube-autoconf-base, cube-autoconf, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: mjf-devfs, bouyer-xeni386
Changes since 1.248: +4 -4 lines
Diff to previous 1.248 (colored)

machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h

Revision 1.246.6.4 / (download) - annotate - [select for diffs], Sun Sep 16 18:27:40 2007 UTC (7 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.246.6.3: +2 -4 lines
Diff to previous 1.246.6.3 (colored) to branchpoint 1.246 (colored)

Remove debug code that crept in.

Revision 1.224.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:35:22 2007 UTC (7 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.224.2.3: +33 -43 lines
Diff to previous 1.224.2.3 (colored)

sync with head.

Revision 1.246.6.3 / (download) - annotate - [select for diffs], Sun Aug 19 19:24:27 2007 UTC (7 years, 2 months ago) by ad
Branch: vmlocking
Changes since 1.246.6.2: +4 -2 lines
Diff to previous 1.246.6.2 (colored) to branchpoint 1.246 (colored)

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

Revision 1.246.8.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:06:18 2007 UTC (7 years, 3 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.246: +33 -43 lines
Diff to previous 1.246 (colored) next main 1.247 (colored)

Sync with head.

Revision 1.246.6.2 / (download) - annotate - [select for diffs], Sun May 27 14:30:08 2007 UTC (7 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.246.6.1: +3 -3 lines
Diff to previous 1.246.6.1 (colored) to branchpoint 1.246 (colored)

Sync with head.

Revision 1.246.2.2 / (download) - annotate - [select for diffs], Mon May 7 10:55:27 2007 UTC (7 years, 5 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.246.2.1: +3 -3 lines
Diff to previous 1.246.2.1 (colored) to branchpoint 1.246 (colored) next main 1.247 (colored)

sync with head.

Revision 1.248 / (download) - annotate - [select for diffs], Mon Apr 16 05:25:36 2007 UTC (7 years, 6 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-idlelwp-base8, vmlocking-base, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: matt-armv6, jmcneill-pm, bouyer-xenamd64
Changes since 1.247: +3 -3 lines
Diff to previous 1.247 (colored)

Make this compile with or without 'options ATADEBUG'.

Revision 1.246.6.1 / (download) - annotate - [select for diffs], Tue Apr 10 13:24:32 2007 UTC (7 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.246: +32 -42 lines
Diff to previous 1.246 (colored)

Sync with head.

Revision 1.246.2.1 / (download) - annotate - [select for diffs], Sat Mar 24 14:55:29 2007 UTC (7 years, 6 months ago) by yamt
Branch: yamt-idlelwp
Changes since 1.246: +32 -42 lines
Diff to previous 1.246 (colored)

sync with head.

Revision 1.246.10.1 / (download) - annotate - [select for diffs], Sun Mar 18 00:06:42 2007 UTC (7 years, 7 months ago) by reinoud
Branch: reinoud-bufcleanup
Changes since 1.246: +32 -42 lines
Diff to previous 1.246 (colored) next main 1.247 (colored)

First attempt to bring branch in sync with HEAD

Revision 1.247 / (download) - annotate - [select for diffs], Sat Mar 17 06:41:35 2007 UTC (7 years, 7 months ago) by dyoung
Branch: MAIN
CVS Tags: thorpej-atomic-base, thorpej-atomic
Changes since 1.246: +32 -42 lines
Diff to previous 1.246 (colored)

Let config(1) know that #define ATADEBUG goes in opt_ata.h.  In
dev/ic/wdc.c and in dev/ata/ata.c, #include "opt_ata.h", and make
both the files compile with or *without* ATADEBUG.  Do not compile
with ATADEBUG by default.

Revision 1.224.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:10:13 2007 UTC (7 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.224.2.2: +116 -2 lines
Diff to previous 1.224.2.2 (colored)

sync with head.

Revision 1.237.2.3 / (download) - annotate - [select for diffs], Thu Feb 1 08:48:21 2007 UTC (7 years, 8 months ago) by ad
Branch: newlock2
Changes since 1.237.2.2: +116 -2 lines
Diff to previous 1.237.2.2 (colored) to branchpoint 1.237 (colored) next main 1.238 (colored)

Sync with head.

Revision 1.243.2.3 / (download) - annotate - [select for diffs], Mon Jan 29 22:25:16 2007 UTC (7 years, 8 months ago) by bouyer
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Changes since 1.243.2.2: +4 -0 lines
Diff to previous 1.243.2.2 (colored) to branchpoint 1.243 (colored) next main 1.244 (colored)

Pull up following revision(s) (requested by sborrill in ticket #389):
	sys/dev/ic/wdc.c: revision 1.246
Add missing bus_space_(read,write)_stream macros.
Approved by martin@

Revision 1.246 / (download) - annotate - [select for diffs], Fri Jan 26 16:28:18 2007 UTC (7 years, 8 months ago) by sborrill
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp, vmlocking, reinoud-bufcleanup, mjf-ufs-trans
Changes since 1.245: +6 -2 lines
Diff to previous 1.245 (colored)

Add missing bus_space_(read,write)_stream macros.
Approved by martin@

Revision 1.243.2.2 / (download) - annotate - [select for diffs], Tue Jan 23 18:35:32 2007 UTC (7 years, 8 months ago) by tron
Branch: netbsd-4
Changes since 1.243.2.1: +76 -30 lines
Diff to previous 1.243.2.1 (colored) to branchpoint 1.243 (colored)

Pull up following revision(s) (requested by bouyer in ticket #380):
	sys/dev/ic/wdc.c: revision 1.245
For the unaligned case:
	Be consistant with the spaces around * and +
	Use data32io[th] for 32bit access
	Use stream bus_space access unless we have DRIVE_NOSTREAM
all pointed out by enami tsugutomo, thanks !

Revision 1.245 / (download) - annotate - [select for diffs], Thu Jan 18 21:42:57 2007 UTC (7 years, 9 months ago) by bouyer
Branch: MAIN
Changes since 1.244: +79 -33 lines
Diff to previous 1.244 (colored)

For the unaligned case:
	Be consistant with the spaces around * and +
	Use data32io[th] for 32bit access
	Use stream bus_space access unless we have DRIVE_NOSTREAM
all pointed out by enami tsugutomo, thanks !

Revision 1.243.2.1 / (download) - annotate - [select for diffs], Mon Jan 15 22:15:13 2007 UTC (7 years, 9 months ago) by pavel
Branch: netbsd-4
Changes since 1.243: +66 -2 lines
Diff to previous 1.243 (colored)

Pull up following revision(s) (requested by martin in ticket #371):
	sys/dev/scsipi/cd.c: revision 1.261
	sys/dev/ic/wdc.c: revision 1.244
If __NO_STRICT_ALIGNMENT is not defined, take special care to do PIO
transfers with proper alignement - this removes alignement restrictions
of the buffer pointer passed.
Thanks to bouyer, reinoud, jdc for helping with the code, and special
thanks to Dave Huang for testing.
The previous fix for PR 34202 was wrong (some sizeof used the union, not
the command block) - but instead of fixing this, we can now revert it
completley: the real fix has been applied to ../ic/wdc.c in rev. 1.244,
removing the alignement constraints.

Revision 1.244 / (download) - annotate - [select for diffs], Sun Jan 14 09:18:39 2007 UTC (7 years, 9 months ago) by martin
Branch: MAIN
Changes since 1.243: +66 -2 lines
Diff to previous 1.243 (colored)

If __NO_STRICT_ALIGNMENT is not defined, take special care to do PIO
transfers with proper alignement - this removes alignement restrictions
of the buffer pointer passed.
Thanks to bouyer, reinoud, jdc for helping with the code, and special
thanks to Dave Huang for testing.

Revision 1.237.2.2 / (download) - annotate - [select for diffs], Fri Jan 12 00:57:36 2007 UTC (7 years, 9 months ago) by ad
Branch: newlock2
Changes since 1.237.2.1: +7 -48 lines
Diff to previous 1.237.2.1 (colored) to branchpoint 1.237 (colored)

Sync with head.

Revision 1.224.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:48:04 2006 UTC (7 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.224.2.1: +86 -5 lines
Diff to previous 1.224.2.1 (colored)

sync with head.

Revision 1.237.4.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:17:07 2006 UTC (7 years, 10 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.237.4.1: +71 -4 lines
Diff to previous 1.237.4.1 (colored) to branchpoint 1.237 (colored) next main 1.238 (colored)

sync with head.

Revision 1.243 / (download) - annotate - [select for diffs], Wed Nov 29 21:37:42 2006 UTC (7 years, 10 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, netbsd-4-base
Branch point for: netbsd-4
Changes since 1.242: +3 -3 lines
Diff to previous 1.242 (colored)

Use mstohz() for callout argument instead of local arithmetic.

Revision 1.242 / (download) - annotate - [select for diffs], Mon Nov 20 23:42:21 2006 UTC (7 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.241: +6 -47 lines
Diff to previous 1.241 (colored)

Move part of wdc_sataprobe() to sys/dev/ata/sata_subr.c so that it can be
shared with non-wdc SATA controllers.

Revision 1.237.2.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:34:15 2006 UTC (7 years, 11 months ago) by ad
Branch: newlock2
Changes since 1.237: +125 -3 lines
Diff to previous 1.237 (colored)

Sync with head.

Revision 1.241 / (download) - annotate - [select for diffs], Tue Nov 14 18:39:10 2006 UTC (7 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.240: +15 -3 lines
Diff to previous 1.240 (colored)

wdc_sataprobe():
- wait up to 1s for SStatus_DET_DEV after SControl_DET_INIT toggle (from
  FreeBSD)
- reset the drive once we know it's there. It may be in some PM state and
  not able to properly reply to IDENTIFY. Tested by Teemu Rinta-aho,
  fixes PR kern/35049 and should also fix PR kern/35008.

Revision 1.240 / (download) - annotate - [select for diffs], Wed Oct 25 20:14:00 2006 UTC (7 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.239: +5 -2 lines
Diff to previous 1.239 (colored)

Exclude wdc_sataprobe() when no SATA controllers are present. Fix
build of *_TINY kernels.

Revision 1.239 / (download) - annotate - [select for diffs], Wed Oct 25 17:33:02 2006 UTC (7 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.238: +96 -3 lines
Diff to previous 1.238 (colored)

Add sata registers to struct wdc_regs. Add wdc_sataprobe(), a function
probing drives using the standard SATA registers; taken from various
PCI sata drivers. Export wdc_drvprobe() too.

Revision 1.237.4.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:05:45 2006 UTC (8 years ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.237: +16 -2 lines
Diff to previous 1.237 (colored)

sync with head

Revision 1.238 / (download) - annotate - [select for diffs], Sat Sep 30 15:56:17 2006 UTC (8 years ago) by itohy
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.237: +16 -2 lines
Diff to previous 1.237 (colored)

A little effort against kernel bloat....
Exclude ATA DMA support if no ATA DMA capable drivers are compiled in.

Revision 1.234.2.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:50:03 2006 UTC (8 years, 1 month ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.234: +7 -7 lines
Diff to previous 1.234 (colored) next main 1.235 (colored)

sync with head

Revision 1.235.2.2 / (download) - annotate - [select for diffs], Sun Sep 3 15:23:57 2006 UTC (8 years, 1 month ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.235.2.1: +3 -3 lines
Diff to previous 1.235.2.1 (colored) to branchpoint 1.235 (colored) next main 1.236 (colored)

sync with head.

Revision 1.237 / (download) - annotate - [select for diffs], Thu Aug 17 17:11:28 2006 UTC (8 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.236: +3 -3 lines
Diff to previous 1.236 (colored)

Fix all the -D*DEBUG* code that it was rotting away and did not even compile.
Mostly from Arnaud Lacombe, many thanks!

Revision 1.224.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:02:57 2006 UTC (8 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.224: +91 -75 lines
Diff to previous 1.224 (colored)

sync with head.

Revision 1.234.4.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:38:56 2006 UTC (8 years, 6 months ago) by simonb
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.234: +6 -6 lines
Diff to previous 1.234 (colored) next main 1.235 (colored)

Sync with head.

Revision 1.235.4.1 / (download) - annotate - [select for diffs], Wed Apr 19 03:24:41 2006 UTC (8 years, 6 months ago) by elad
Branch: elad-kernelauth
Changes since 1.235: +4 -4 lines
Diff to previous 1.235 (colored) next main 1.236 (colored)

sync with head.

Revision 1.235.2.1 / (download) - annotate - [select for diffs], Sat Apr 1 12:06:59 2006 UTC (8 years, 6 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.235: +4 -4 lines
Diff to previous 1.235 (colored)

sync with head.

Revision 1.235.6.1 / (download) - annotate - [select for diffs], Tue Mar 28 09:42:11 2006 UTC (8 years, 6 months ago) by tron
Branch: peter-altq
Changes since 1.235: +4 -4 lines
Diff to previous 1.235 (colored) next main 1.236 (colored)

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

Revision 1.236 / (download) - annotate - [select for diffs], Sat Mar 18 10:59:58 2006 UTC (8 years, 7 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.235: +4 -4 lines
Diff to previous 1.235 (colored)

__wdcwait_reset(): if we hare there we have a wdc pointer, so no need to check
if wdc is not NULL here at all (we were doing it after wdc has been
dereferenced anyway).
Coverity ID 2441.

Revision 1.231.2.2 / (download) - annotate - [select for diffs], Wed Mar 1 09:28:13 2006 UTC (8 years, 7 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.231.2.1: +4 -4 lines
Diff to previous 1.231.2.1 (colored) to branchpoint 1.231 (colored) next main 1.232 (colored)

sync with head.

Revision 1.235 / (download) - annotate - [select for diffs], Mon Feb 20 16:50:37 2006 UTC (8 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.234: +4 -4 lines
Diff to previous 1.234 (colored)

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

Revision 1.231.2.1 / (download) - annotate - [select for diffs], Wed Feb 1 14:52:08 2006 UTC (8 years, 8 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.231: +24 -22 lines
Diff to previous 1.231 (colored)

sync with head.

Revision 1.220.2.8.2.1 / (download) - annotate - [select for diffs], Thu Jan 26 21:21:12 2006 UTC (8 years, 8 months ago) by jdc
Branch: netbsd-3-0
CVS Tags: netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE
Changes since 1.220.2.8: +6 -2 lines
Diff to previous 1.220.2.8 (colored) next main 1.220.2.9 (colored)

Pull up revision 1.231 (requested by bouyer in ticket #1125).

After a reset don't wait for drives to come ready if there's no drives.
Fix a 30s hang after resume. Problem reported and fix tested by Brian de Alwis.

Revision 1.220.2.9 / (download) - annotate - [select for diffs], Thu Jan 26 21:09:23 2006 UTC (8 years, 8 months ago) by jdc
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1
Changes since 1.220.2.8: +6 -2 lines
Diff to previous 1.220.2.8 (colored) to branchpoint 1.220 (colored) next main 1.221 (colored)

Pull up revision 1.231 (requested by bouyer in ticket #1125).

After a reset don't wait for drives to come ready if there's no drives.
Fix a 30s hang after resume. Problem reported and fix tested by Brian de Alwis.

Revision 1.234 / (download) - annotate - [select for diffs], Tue Jan 24 21:43:26 2006 UTC (8 years, 8 months ago) by bouyer
Branch: MAIN
Branch point for: simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.233: +6 -3 lines
Diff to previous 1.233 (colored)

Revert part of previous: checking the drive's status after a read seems to
cause interrupt timeouts on some hardware.

Revision 1.233 / (download) - annotate - [select for diffs], Sun Jan 22 16:44:45 2006 UTC (8 years, 9 months ago) by bouyer
Branch: MAIN
Changes since 1.232: +12 -6 lines
Diff to previous 1.232 (colored)

Make some debug printf more verbose.
In wdccommand_intr(), after a data read check that the drive is ready again.

Revision 1.232 / (download) - annotate - [select for diffs], Mon Jan 16 20:30:19 2006 UTC (8 years, 9 months ago) by bouyer
Branch: MAIN
Changes since 1.231: +11 -18 lines
Diff to previous 1.231 (colored)

properly use ata_channel->ch_ndrive:
- initialize it properly in the bus front-ends (all 2, exept in wdc_pcmcia.c
  for the "Sandisk CompactFlash Card" where it's set to 1)
- remplace hardcoded '2' by ata_channel->ch_ndrive in MI IDE drivers.

From Christos Zoulas in kern/32501.

Revision 1.123.2.11 / (download) - annotate - [select for diffs], Sun Dec 11 10:28:51 2005 UTC (8 years, 10 months ago) by christos
Branch: ktrace-lwp
Changes since 1.123.2.10: +6 -2 lines
Diff to previous 1.123.2.10 (colored) next main 1.124 (colored)

Sync with head.

Revision 1.230.6.1 / (download) - annotate - [select for diffs], Tue Nov 22 16:08:07 2005 UTC (8 years, 11 months ago) by yamt
Branch: yamt-readahead
Changes since 1.230: +6 -2 lines
Diff to previous 1.230 (colored) next main 1.231 (colored)

sync with head.

Revision 1.231 / (download) - annotate - [select for diffs], Wed Nov 16 23:39:08 2005 UTC (8 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-readahead-base3, yamt-readahead-base2, ktrace-lwp-base
Branch point for: yamt-uio_vmspace
Changes since 1.230: +6 -2 lines
Diff to previous 1.230 (colored)

After a reset don't wait for drives to come ready if there's no drives.
Fix a 30s hang after resume. Problem reported and fix tested by Brian de Alwis.

Revision 1.123.2.10 / (download) - annotate - [select for diffs], Thu Nov 10 14:04:16 2005 UTC (8 years, 11 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.123.2.9: +117 -95 lines
Diff to previous 1.123.2.9 (colored)

Sync with HEAD. Here we go again...

Revision 1.172.2.7.2.11 / (download) - annotate - [select for diffs], Fri Oct 28 01:38:58 2005 UTC (8 years, 11 months ago) by jmc
Branch: netbsd-2
Changes since 1.172.2.7.2.10: +4 -3 lines
Diff to previous 1.172.2.7.2.10 (colored) to branchpoint 1.172.2.7 (colored) next main 1.173 (colored)

Pullup (via patch) requested by bouyer in ticket #5852
  In __wdccommand_start(), don't cann wdcwait() with ata_c->flags, as this gives
  information about the context in which wdc_exec_command() was called, but
  we may be in interrupt context here. Call wdcwait() with flags derived from
  xfer->c_flags instead, as do other wdcwait() callers. PR#31083

Revision 1.220.2.8 / (download) - annotate - [select for diffs], Tue Sep 13 21:37:46 2005 UTC (9 years, 1 month ago) by tron
Branch: netbsd-3
CVS Tags: netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1
Branch point for: netbsd-3-0
Changes since 1.220.2.7: +4 -3 lines
Diff to previous 1.220.2.7 (colored) to branchpoint 1.220 (colored)

Pull up following revision(s) (requested by bouyer in ticket #780):
	sys/dev/ic/wdc.c: revision 1.230
In __wdccommand_start(), don't call wdcwait() with ata_c->flags, as this gives
information about the context in which wdc_exec_command() was called, but
we may be in interrupt context here. Call wdcwait() with flags derived from
xfer->c_flags instead, as do other wdcwait() callers.
Should fix kern/31083 by Jukka Salmi.

Revision 1.230 / (download) - annotate - [select for diffs], Mon Aug 29 19:30:07 2005 UTC (9 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base, thorpej-vnode-attr-base, thorpej-vnode-attr
Branch point for: yamt-readahead
Changes since 1.229: +4 -3 lines
Diff to previous 1.229 (colored)

In __wdccommand_start(), don't cann wdcwait() with ata_c->flags, as this gives
information about the context in which wdc_exec_command() was called, but
we may be in interrupt context here. Call wdcwait() with flags derived from
xfer->c_flags instead, as do other wdcwait() callers.
Should fix kern/31083 by Jukka Salmi.

Revision 1.220.2.7 / (download) - annotate - [select for diffs], Wed Aug 24 21:53:46 2005 UTC (9 years, 1 month ago) by tron
Branch: netbsd-3
Changes since 1.220.2.6: +4 -3 lines
Diff to previous 1.220.2.6 (colored) to branchpoint 1.220 (colored)

Pull up revision 1.229 (requested by bouyer in ticket #693):
make CF on pcmcia works again.
Approved by bouyer.
closed kern/30998.

Revision 1.220.2.6 / (download) - annotate - [select for diffs], Wed Aug 24 21:53:23 2005 UTC (9 years, 1 month ago) by tron
Branch: netbsd-3
Changes since 1.220.2.5: +22 -18 lines
Diff to previous 1.220.2.5 (colored) to branchpoint 1.220 (colored)

Pull up revision 1.226 (requested by bouyer in ticket #693):
The ATA/ATAPI IDENTIFY data were designed to be converted on the fly to
host byte order (eventually the byte swapping could be wired in hardware, on
the 16 bit data bus). This was keept when wdc_exec_command() was created,
and as a result wdc_exec_command() is doing 16bit conversion to host byte
order. This is fine for IDENTIFY but doesn't work for other opaque data
structure, such as the ones for SMART.
So change wdc_exec_command() to do the conversion to host byte order only for
WDCC_IDENTIFY and ATAPI_IDENTIFY_DEVICE. This fixes atactl smart status
on big-endian hosts.
While here change __wdccommand_intr() to only use wdc_data{in,out}_pio, there
is no gain in doing the 32bit data port stuff locally.

Revision 1.172.2.7.2.10 / (download) - annotate - [select for diffs], Tue Aug 23 13:35:55 2005 UTC (9 years, 2 months ago) by tron
Branch: netbsd-2
CVS Tags: netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1
Changes since 1.172.2.7.2.9: +3 -3 lines
Diff to previous 1.172.2.7.2.9 (colored) to branchpoint 1.172.2.7 (colored)

Apply patch (requested by bouyer in ticket #5605):
On NetBSD 2.x chp->ch_wdc can be NULL in some case, check for this.
This avoids panics in wdcprobe().

Revision 1.172.2.7.2.9 / (download) - annotate - [select for diffs], Tue Aug 23 13:07:31 2005 UTC (9 years, 2 months ago) by tron
Branch: netbsd-2
Changes since 1.172.2.7.2.8: +3 -3 lines
Diff to previous 1.172.2.7.2.8 (colored) to branchpoint 1.172.2.7 (colored)

Apply patch (requested by bouyer in ticket #5604):
Fix error in patch from ticket #5603.

Revision 1.172.2.7.2.8 / (download) - annotate - [select for diffs], Mon Aug 22 22:10:48 2005 UTC (9 years, 2 months ago) by riz
Branch: netbsd-2
Changes since 1.172.2.7.2.7: +72 -23 lines
Diff to previous 1.172.2.7.2.7 (colored) to branchpoint 1.172.2.7 (colored)

Pull up following revision(s) (requested by bouyer in ticket #5603):
	sys/dev/ic/wdc.c: revision 1.226
The ATA/ATAPI IDENTIFY data were designed to be converted on the fly to
host byte order (eventually the byte swapping could be wired in hardware, on
the 16 bit data bus). This was keept when wdc_exec_command() was created,
and as a result wdc_exec_command() is doing 16bit conversion to host byte
order. This is fine for IDENTIFY but doesn't work for other opaque data
structure, such as the ones for SMART.
So change wdc_exec_command() to do the conversion to host byte order only for
WDCC_IDENTIFY and ATAPI_IDENTIFY_DEVICE. This fixes atactl smart status
on big-endian hosts.

        sys/dev/ic/wdc.c: revision 1.229
make CF on pcmcia works again.
Approved by bouyer.
closed kern/30998.

Revision 1.220.2.5 / (download) - annotate - [select for diffs], Thu Aug 18 20:10:52 2005 UTC (9 years, 2 months ago) by tron
Branch: netbsd-3
Changes since 1.220.2.4: +3 -2 lines
Diff to previous 1.220.2.4 (colored) to branchpoint 1.220 (colored)

Pull up revision 1.228 (requested by bouyer in ticket #653):
Add missing declaration/initialisation of wdc.
Pointed out by Rui Paulo.

Revision 1.220.2.4 / (download) - annotate - [select for diffs], Thu Aug 18 20:08:54 2005 UTC (9 years, 2 months ago) by tron
Branch: netbsd-3
Changes since 1.220.2.3: +5 -2 lines
Diff to previous 1.220.2.3 (colored) to branchpoint 1.220 (colored)

Pull up revision 1.227 (requested by bouyer in ticket #653):
Also initialize wdc->reset in wdcprobe() if the bus back-end didn't provide
one. Prevent NULL pointer dereference when wdcprobe() is called.

Revision 1.220.2.3 / (download) - annotate - [select for diffs], Thu Aug 18 20:02:46 2005 UTC (9 years, 2 months ago) by tron
Branch: netbsd-3
Changes since 1.220.2.2: +32 -32 lines
Diff to previous 1.220.2.2 (colored) to branchpoint 1.220 (colored)

Pull up revision 1.225 (requested by bouyer in ticket #653):
Add an optionnal controller callback for channel reset. If the callback
is set to NULL, use the generic reset code.
Use this to work around a bug in some Acer IDE controllers (like the
one found in some sparc systems) where a controller disable/enable
is required after a reset to avoid data corruption when Ultra-DMA is
used. Workaround from opensolaris, thanks to Hiroki Sato for testing.

Revision 1.229 / (download) - annotate - [select for diffs], Wed Aug 17 22:41:33 2005 UTC (9 years, 2 months ago) by tacha
Branch: MAIN
Changes since 1.228: +4 -3 lines
Diff to previous 1.228 (colored)

make CF on pcmcia works again.

Approved by bouyer.
closed kern/30998.

Revision 1.172.2.7.2.7 / (download) - annotate - [select for diffs], Sat Aug 13 23:35:26 2005 UTC (9 years, 2 months ago) by riz
Branch: netbsd-2
Changes since 1.172.2.7.2.6: +3 -3 lines
Diff to previous 1.172.2.7.2.6 (colored) to branchpoint 1.172.2.7 (colored)

Pull up patch (requested by bouyer in ticket #5561):

CHAN_TO_WDC() doesn't exist on netbsd-2; correct this pullup (as
requested by bouyer).

Revision 1.172.2.7.2.6 / (download) - annotate - [select for diffs], Sat Aug 13 23:27:22 2005 UTC (9 years, 2 months ago) by riz
Branch: netbsd-2
Changes since 1.172.2.7.2.5: +3 -2 lines
Diff to previous 1.172.2.7.2.5 (colored) to branchpoint 1.172.2.7 (colored)

Pull up revision 1.228 (requested by bouyer in ticket #5561):
Add missing declaration/initialisation of wdc.
Pointed out by Rui Paulo.

Revision 1.172.2.7.2.5 / (download) - annotate - [select for diffs], Sat Aug 13 23:26:04 2005 UTC (9 years, 2 months ago) by riz
Branch: netbsd-2
Changes since 1.172.2.7.2.4: +5 -2 lines
Diff to previous 1.172.2.7.2.4 (colored) to branchpoint 1.172.2.7 (colored)

Pull up revision 1.227 (requested by bouyer in ticket #5561):
Also initialize wdc->reset in wdcprobe() if the bus back-end didn't provide
one. Prevent NULL pointer dereference when wdcprobe() is called.

Revision 1.228 / (download) - annotate - [select for diffs], Wed Aug 10 13:15:42 2005 UTC (9 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.227: +3 -2 lines
Diff to previous 1.227 (colored)

Add missing declaration/initialisation of wdc.
Pointed out by Rui Paulo.

Revision 1.227 / (download) - annotate - [select for diffs], Wed Aug 10 11:16:53 2005 UTC (9 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.226: +5 -2 lines
Diff to previous 1.226 (colored)

Also initialize wdc->reset in wdcprobe() if the bus back-end didn't provide
one. Prevent NULL pointer dereference when wdcprobe() is called.

Revision 1.226 / (download) - annotate - [select for diffs], Tue Aug 9 22:08:16 2005 UTC (9 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.225: +22 -18 lines
Diff to previous 1.225 (colored)

The ATA/ATAPI IDENTIFY data were designed to be converted on the fly to
host byte order (eventually the byte swapping could be wired in hardware, on
the 16 bit data bus). This was keept when wdc_exec_command() was created,
and as a result wdc_exec_command() is doing 16bit conversion to host byte
order. This is fine for IDENTIFY but doesn't work for other opaque data
structure, such as the ones for SMART.
So change wdc_exec_command() to do the conversion to host byte order only for
WDCC_IDENTIFY and ATAPI_IDENTIFY_DEVICE. This fixes atactl smart status
on big-endian hosts.

While here change __wdccommand_intr() to only use wdc_data{in,out}_pio, there
is no gain in doing the 32bit data port stuff locally.

Revision 1.172.2.7.2.4 / (download) - annotate - [select for diffs], Sun Aug 7 15:51:36 2005 UTC (9 years, 2 months ago) by riz
Branch: netbsd-2
Changes since 1.172.2.7.2.3: +38 -34 lines
Diff to previous 1.172.2.7.2.3 (colored) to branchpoint 1.172.2.7 (colored)

Pull up revision 1.225 via patch (requested by bouyer in ticket #5555):
Add an optionnal controller callback for channel reset. If the callback
is set to NULL, use the generic reset code.
Use this to work around a bug in some Acer IDE controllers (like the
one found in some sparc systems) where a controller disable/enable
is required after a reset to avoid data corruption when Ultra-DMA is
used. Workaround from opensolaris, thanks to Hiroki Sato for testing.

Revision 1.225 / (download) - annotate - [select for diffs], Sat Aug 6 22:07:24 2005 UTC (9 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.224: +34 -34 lines
Diff to previous 1.224 (colored)

Add an optionnal controller callback for channel reset. If the callback
is set to NULL, use the generic reset code.
Use this to work around a bug in some Acer IDE controllers (like the
one found in some sparc systems) where a controller disable/enable
is required after a reset to avoid data corruption when Ultra-DMA is
used. Workaround from opensolaris, thanks to Hiroki Sato for testing.

Revision 1.172.2.7.2.3 / (download) - annotate - [select for diffs], Tue Jul 5 21:04:08 2005 UTC (9 years, 3 months ago) by riz
Branch: netbsd-2
Changes since 1.172.2.7.2.2: +30 -17 lines
Diff to previous 1.172.2.7.2.2 (colored) to branchpoint 1.172.2.7 (colored)

Pull up revision 1.224 via patch (requested by bouyer in ticket #2030):
In wdcprobe1(), wait 5s for the drive to deassert ready. In case of e.g.
pcmcia devices, the drive may still be doing its power-on reset.
XXX From the specs the delay could be up to 31s here, but we don't want to
    wait for 31s if we have a channel with no drives and pull-up resitors on
    the bus.
Based on patch submitted in kern/25659 by Steven M. Bellovin, part of fix for
kern/25659.

Revision 1.220.2.2 / (download) - annotate - [select for diffs], Sat Jul 2 23:15:30 2005 UTC (9 years, 3 months ago) by tron
Branch: netbsd-3
Changes since 1.220.2.1: +29 -16 lines
Diff to previous 1.220.2.1 (colored) to branchpoint 1.220 (colored)

Pull up revision 1.224 (requested by bouyer in ticket #499):
In wdcprobe1(), wait 5s for the drive to deassert ready. In case of e.g.
pcmcia devices, the drive may still be doing its power-on reset.
XXX From the specs the delay could be up to 31s here, but we don't want to
    wait for 31s if we have a channel with no drives and pull-up resitors on
    the bus.
Based on patch submitted in kern/25659 by Steven M. Bellovin, part of fix for
kern/25659.

Revision 1.220.2.1 / (download) - annotate - [select for diffs], Wed Jun 22 18:38:33 2005 UTC (9 years, 4 months ago) by tron
Branch: netbsd-3
Changes since 1.220: +3 -4 lines
Diff to previous 1.220 (colored)

Pull up revision 1.223 (requested by bouyer in ticket #480):
Remove a (wdc == NULL) test. We know wdc is not NULL at this point.

Revision 1.224 / (download) - annotate - [select for diffs], Sun Jun 19 18:14:27 2005 UTC (9 years, 4 months ago) by bouyer
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.223: +31 -18 lines
Diff to previous 1.223 (colored)

In wdcprobe1(), wait 5s for the drive to deassert ready. In case of e.g.
pcmcia devices, the drive may still be doing its power-on reset.
XXX From the specs the delay could be up to 31s here, but we don't want to
    wait for 31s if we have a channel with no drives and pull-up resitors on
    the bus.
Based on patch submitted in kern/25659 by Steven M. Bellovin, part of fix for
kern/25659.

Revision 1.223 / (download) - annotate - [select for diffs], Thu Jun 16 20:15:04 2005 UTC (9 years, 4 months ago) by bouyer
Branch: MAIN
Changes since 1.222: +3 -4 lines
Diff to previous 1.222 (colored)

Remove a (wdc == NULL) test. We know wdc is not NULL at this point.

Revision 1.222 / (download) - annotate - [select for diffs], Sun May 29 22:10:28 2005 UTC (9 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.221: +28 -28 lines
Diff to previous 1.221 (colored)

- sprinkle const.
- avoid variable shadowing.

Revision 1.217.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:28:53 2005 UTC (9 years, 5 months ago) by kent
Branch: kent-audio2
Changes since 1.217: +60 -43 lines
Diff to previous 1.217 (colored) next main 1.218 (colored)

sync with -current

Revision 1.172.2.7.2.2 / (download) - annotate - [select for diffs], Sat Apr 16 10:59:50 2005 UTC (9 years, 6 months ago) by tron
Branch: netbsd-2
Changes since 1.172.2.7.2.1: +36 -2 lines
Diff to previous 1.172.2.7.2.1 (colored) to branchpoint 1.172.2.7 (colored)

Pull up revision 1.217 via patch (requested by bouyer in ticket #1105):
Allow polled commands to be queued, if ata_exec_xfer() is called in thread
context. For this introduce 3 new xfer tags:
- C_WAIT, equivalent of AT_WAIT
- C_WAITACT, when there is a thread waiting on this xfer to become the active
  one (that is, to be at the head of the queue)
- C_FREE, set by ata_free_xfer() when it can't free the xfer because it's
  still in use. The holder should then free the xfer ASAP.
If ata_exec_xfer() is called with (C_POLL | C_WAIT), and there is already
xfers to be processed, assert C_WAITACT and sleep.
atastart() checks for C_WAITACT, and wakeup the thread waiting for this xfer
to become active if set. atastart() won't process this xfer, it's the
responsability of the thread waked up to handle it.
Fix (the right way) kern/27421 by Martin Husemann.

Revision 1.123.2.9 / (download) - annotate - [select for diffs], Fri Apr 1 14:29:52 2005 UTC (9 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.123.2.8: +4 -4 lines
Diff to previous 1.123.2.8 (colored)

Sync with HEAD.

Revision 1.221 / (download) - annotate - [select for diffs], Mon Mar 28 22:08:51 2005 UTC (9 years, 6 months ago) by fvdl
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.220: +4 -4 lines
Diff to previous 1.220 (colored)

Reverse the cyl_lo and cyl_hi reads for the AT_READREG case; previously,
the cyl_lo information would have been thrown away.

Revision 1.217.6.2 / (download) - annotate - [select for diffs], Sat Mar 19 08:34:04 2005 UTC (9 years, 7 months ago) by yamt
Branch: yamt-km
Changes since 1.217.6.1: +22 -22 lines
Diff to previous 1.217.6.1 (colored) to branchpoint 1.217 (colored) next main 1.218 (colored)

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

Revision 1.172.2.7.2.1 / (download) - annotate - [select for diffs], Wed Mar 16 18:37:03 2005 UTC (9 years, 7 months ago) by jmc
Branch: netbsd-2
Changes since 1.172.2.7: +6 -19 lines
Diff to previous 1.172.2.7 (colored)

Pullup rev 1.180 (requested by mycroft in ticket #1018)

	Only downgrade modes due to an actual CRC error.  Downgrading on other errors
is anti-social -- especially given that there's no way to upgrade again short
of rebooting.

Also, downgrade UDMA modes more slowly.  It's entirely possible that they're
using an 80-wire cable, but it's just too long for the higher modes, or there
is minor crosstalk.

Revision 1.123.2.8 / (download) - annotate - [select for diffs], Fri Mar 4 16:41:35 2005 UTC (9 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.123.2.7: +22 -22 lines
Diff to previous 1.123.2.7 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.220 / (download) - annotate - [select for diffs], Wed Mar 2 12:25:27 2005 UTC (9 years, 7 months ago) by mycroft
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.219: +3 -3 lines
Diff to previous 1.219 (colored)

Copyright maintenance.

Revision 1.219 / (download) - annotate - [select for diffs], Sun Feb 27 00:27:03 2005 UTC (9 years, 7 months ago) by perry
Branch: MAIN
Changes since 1.218: +21 -21 lines
Diff to previous 1.218 (colored)

nuke trailing whitespace

Revision 1.123.2.7 / (download) - annotate - [select for diffs], Tue Feb 15 21:33:12 2005 UTC (9 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.123.2.6: +38 -21 lines
Diff to previous 1.123.2.6 (colored)

Sync with HEAD.

Revision 1.217.6.1 / (download) - annotate - [select for diffs], Sat Feb 12 18:17:44 2005 UTC (9 years, 8 months ago) by yamt
Branch: yamt-km
Changes since 1.217: +38 -21 lines
Diff to previous 1.217 (colored)

sync with head.

Revision 1.218 / (download) - annotate - [select for diffs], Fri Feb 11 21:11:15 2005 UTC (9 years, 8 months ago) by rearnsha
Branch: MAIN
CVS Tags: yamt-km-base2, matt-timespec
Changes since 1.217: +38 -21 lines
Diff to previous 1.217 (colored)

Add support for Artisea chips operating in DPA mode, which has a
16-bit view of the ATA command registers for extended commands.

Approved by briggs.

Revision 1.123.2.6 / (download) - annotate - [select for diffs], Tue Nov 2 07:51:31 2004 UTC (9 years, 11 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.123.2.5: +19 -12 lines
Diff to previous 1.123.2.5 (colored)

Sync with HEAD.

Revision 1.217 / (download) - annotate - [select for diffs], Sat Oct 30 23:10:37 2004 UTC (9 years, 11 months ago) by bouyer
Branch: MAIN
CVS Tags: yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.216: +5 -3 lines
Diff to previous 1.216 (colored)

Allow polled commands to be queued, if ata_exec_xfer() is called in thread
context. For this introduce 3 new xfer tags:
- C_WAIT, equivalent of AT_WAIT
- C_WAITACT, when there is a thread waiting on this xfer to become the active
  one (that is, to be at the head of the queue)
- C_FREE, set by ata_free_xfer() when it can't free the xfer because it's
  still in use. The holder should then free the xfer ASAP.

If ata_exec_xfer() is called with (C_POLL | C_WAIT), and there is already
xfers to be processed, assert C_WAITACT and sleep.
atastart() checks for C_WAITACT, and wakeup the thread waiting for this xfer
to become active if set. atastart() won't process this xfer, it's the
responsability of the thread waked up to handle it.

Fix (the right way) kern/27421 by Martin Husemann.

Revision 1.216 / (download) - annotate - [select for diffs], Sat Oct 30 17:17:21 2004 UTC (9 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.215: +9 -3 lines
Diff to previous 1.215 (colored)

Revert 1.215, with a comment explaining why we can't use interrupts here.

Revision 1.215 / (download) - annotate - [select for diffs], Tue Oct 26 21:21:59 2004 UTC (9 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.214: +4 -5 lines
Diff to previous 1.214 (colored)

wdc_drvprobe(): don't poll for the IDENTIFY, use interrupts. There's no
reasons to not use interrupts here, and polling cause problems when there is
a shared queue between 2 channels.
Fix kern/27421 by Martin Husemann.

Revision 1.214 / (download) - annotate - [select for diffs], Mon Oct 25 22:42:09 2004 UTC (9 years, 11 months ago) by enami
Branch: MAIN
Changes since 1.213: +10 -10 lines
Diff to previous 1.213 (colored)

Fill some entry in fake wdc_ata_bustype since those are called even
if no wd(4) device is configured in a kernel.

Revision 1.123.2.5 / (download) - annotate - [select for diffs], Tue Sep 21 13:28:09 2004 UTC (10 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.123.2.4: +2 -2 lines
Diff to previous 1.123.2.4 (colored)

Fix the sync with head I botched.

Revision 1.123.2.4 / (download) - annotate - [select for diffs], Sat Sep 18 14:46:01 2004 UTC (10 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.123.2.3: +2 -2 lines
Diff to previous 1.123.2.3 (colored)

Sync with HEAD.

Revision 1.172.2.7 / (download) - annotate - [select for diffs], Fri Sep 17 04:04:57 2004 UTC (10 years, 1 month ago) by jmc
Branch: 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-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2
Changes since 1.172.2.6: +6 -5 lines
Diff to previous 1.172.2.6 (colored) to branchpoint 1.172 (colored) next main 1.173 (colored)

Pullup patch (requested by bouyer in ticket #854)

__wdc_reset_channel(): give the loop over commands a chance to terminate by
- updating xfer on each iteration (ops)
- making sure that xfers gets removed from the queue

Revision 1.172.2.6 / (download) - annotate - [select for diffs], Sat Sep 11 18:32:01 2004 UTC (10 years, 1 month ago) by he
Branch: netbsd-2-0
Changes since 1.172.2.5: +3 -2 lines
Diff to previous 1.172.2.5 (colored) to branchpoint 1.172 (colored)

Apply patch (requested by bouyer in ticket #840):
  If we are not going to handle a reset request because one is
  already pending, decrease queue_freeze that we just increased.
  Otherwise, the queue stays frozen after the reset.
  Should fix PR#26873 and PR#26910.

Revision 1.123.2.3 / (download) - annotate - [select for diffs], Wed Aug 25 06:57:35 2004 UTC (10 years, 1 month ago) by skrll
Branch: ktrace-lwp
Changes since 1.123.2.2: +477 -1073 lines
Diff to previous 1.123.2.2 (colored)

Sync with HEAD.

Revision 1.213 / (download) - annotate - [select for diffs], Sat Aug 21 01:51:46 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.212: +15 -7 lines
Diff to previous 1.212 (colored)

Make some functions referenced only in wdc.c private to that file.

Revision 1.212 / (download) - annotate - [select for diffs], Sat Aug 21 00:28:34 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.211: +25 -4 lines
Diff to previous 1.211 (colored)

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.211 / (download) - annotate - [select for diffs], Fri Aug 20 23:26:54 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.210: +14 -42 lines
Diff to previous 1.210 (colored)

- Add an (*ata_reset_channel)() member to ata_bustype.
- Add an ata_reset_channel() function that performs the common parts
  of resetting an ATA channel, which uses the (*ata_reset_channel)()
  callback to do the heavy lifting.  Adjust callers to use ata_reset_channel()
  instead of wdc_reset_channel().

This removes the last wdc-specific code from ata.c!

Revision 1.210 / (download) - annotate - [select for diffs], Fri Aug 20 22:17:06 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.209: +5 -13 lines
Diff to previous 1.209 (colored)

Move common parts of attaching an ata_channel to a new ata_channel_attach()
function.

Revision 1.209 / (download) - annotate - [select for diffs], Fri Aug 20 22:02:40 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.208: +2 -140 lines
Diff to previous 1.208 (colored)

Move atabusconfig() to ata.c.

Revision 1.208 / (download) - annotate - [select for diffs], Fri Aug 20 20:52:31 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.207: +10 -4 lines
Diff to previous 1.207 (colored)

- Add an atac_bustype_ata member to atac_softc to hold a pointer to
  the ata_bustype for the controller.  Fill it in and use it instead
  of referencing wdc_ata_bustype directly.
- Add an atac_atapibus_attach member to atac_softc to hold a pointer
  to the function that attaches the ATAPI bus for the controller.  Fill
  it in and use it instead of referencing wdc_atapibus_attach directly.

Revision 1.207 / (download) - annotate - [select for diffs], Fri Aug 20 06:39:38 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.206: +115 -110 lines
Diff to previous 1.206 (colored)

Move most of wdc_softc into a new atac_softc structure that contains
info common to all types of ATA controllers.

Revision 1.206 / (download) - annotate - [select for diffs], Thu Aug 19 23:25:35 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.205: +3 -3 lines
Diff to previous 1.205 (colored)

- Add and use a CHAN_TO_WDC() macro to get the wdc_softc from an
  ata_channel.
- Add and use a CHAN_TO_WDC_REGS() macro to get the wdc_regs from an
  ata_channel.
- Add and use a CHAN_TO_PCIIDE() macro to get the pciide_softc from an
  ata_channel.
- Add and use a CHAN_TO_PCHAN() macro to get the pciide_channel from an
  ata_channel.  (This one just hides a cast, and is really just for
  consistency with the others.)

Revision 1.205 / (download) - annotate - [select for diffs], Sat Aug 14 15:08:05 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.204: +292 -263 lines
Diff to previous 1.204 (colored)

- Split the register handles out of struct wdc_channel into a separate
  wdc_regs structure, and array of which (indexed per channel) is pointed
  to by struct wdc_softc.
- Move the resulting wdc_channel structure to atavar.h and rename it to
  ata_channel.  Rename the corresponding flags.
- Add a "ch_ndrive" member to struct ata_channel, which indicates the
  maximum number of drives that can be present on the channel.  For now,
  this is always 2.  Add an ATA_MAXDRIVES constant that places an upper
  limit on this value, also currently 2.

Revision 1.204 / (download) - annotate - [select for diffs], Fri Aug 13 04:10:49 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.203: +51 -51 lines
Diff to previous 1.203 (colored)

WDCDEBUG -> ATADEBUG.

Revision 1.203 / (download) - annotate - [select for diffs], Fri Aug 13 03:12:59 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.202: +24 -24 lines
Diff to previous 1.202 (colored)

Don't bother with bits that tell of the presence of optional callbacks;
just check the function pointers for NULL.

Revision 1.202 / (download) - annotate - [select for diffs], Fri Aug 13 02:16:40 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.201: +5 -64 lines
Diff to previous 1.201 (colored)

Move wdcstart() to ata.c and rename it to atastart().

Revision 1.201 / (download) - annotate - [select for diffs], Fri Aug 13 02:10:43 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.200: +3 -21 lines
Diff to previous 1.200 (colored)

Move wdc_exec_xfer() to ata.c and rename it ata_exec_xfer().

Revision 1.200 / (download) - annotate - [select for diffs], Thu Aug 12 22:39:41 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.199: +3 -35 lines
Diff to previous 1.199 (colored)

Move wdc_addref() and wdc_delref() to ata.c and rename them to
ata_*.

Revision 1.199 / (download) - annotate - [select for diffs], Thu Aug 12 22:33:45 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.198: +2 -36 lines
Diff to previous 1.198 (colored)

Move wdc_kill_pending() to ata.c and rename it ata_kill_pending().

Revision 1.198 / (download) - annotate - [select for diffs], Thu Aug 12 21:34:52 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.197: +6 -44 lines
Diff to previous 1.197 (colored)

- Move wdc_xfer_pool, wdc_get_xfer(), wdc_free_xfer() to ata.c, and rename
  to ata_*.
- Use a static initializer for the ata_xfer_pool.

Revision 1.197 / (download) - annotate - [select for diffs], Thu Aug 12 21:10:18 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.196: +3 -230 lines
Diff to previous 1.196 (colored)

Move wdc_probe_caps() to ata.c and rename it ata_probe_caps().

Revision 1.196 / (download) - annotate - [select for diffs], Thu Aug 12 21:05:09 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.195: +2 -51 lines
Diff to previous 1.195 (colored)

Move wdc_downgrade_mode() to ata.c and rename it to ata_downgrade_mode().

Revision 1.195 / (download) - annotate - [select for diffs], Thu Aug 12 20:59:27 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.194: +4 -38 lines
Diff to previous 1.194 (colored)

Move wdc_print_modes() into ata.c and rename it ata_print_modes().

Revision 1.194 / (download) - annotate - [select for diffs], Thu Aug 12 14:36:46 2004 UTC (10 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.193: +4 -4 lines
Diff to previous 1.193 (colored)

Whoops.  Swap the order of the delref() and the config_pending_decr().

Revision 1.123.2.2 / (download) - annotate - [select for diffs], Thu Aug 12 11:41:27 2004 UTC (10 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.123.2.1: +257 -119 lines
Diff to previous 1.123.2.1 (colored)

Sync with HEAD.

Revision 1.193 / (download) - annotate - [select for diffs], Thu Aug 12 05:02:50 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.192: +6 -6 lines
Diff to previous 1.192 (colored)

Rename some constants:
WDC_COMPLETE -> ATACMD_COMPLETE
WDC_QUEUED -> ATACMD_QUEUED
WDC_TRY_AGAIN -> ATACMD_TRY_AGAIN

Revision 1.192 / (download) - annotate - [select for diffs], Thu Aug 12 04:57:19 2004 UTC (10 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.191: +66 -66 lines
Diff to previous 1.191 (colored)

Rename "struct wdc_command" to "struct ata_command".

Revision 1.172.2.5 / (download) - annotate - [select for diffs], Wed Aug 11 19:43:58 2004 UTC (10 years, 2 months ago) by jmc
Branch: netbsd-2-0
Changes since 1.172.2.4: +80 -21 lines
Diff to previous 1.172.2.4 (colored) to branchpoint 1.172 (colored)

Pullup rev 1.182 (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.191 / (download) - annotate - [select for diffs], Wed Aug 11 18:41:46 2004 UTC (10 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.190: +10 -4 lines
Diff to previous 1.190 (colored)

Make datain_pio and dataout_pio function pointers in wdc_softc, which can
be overridden by the backend if desired.  Add experimental code to wdc_pcmcia
to use this in memory-mapped mode, disabled by default.

Revision 1.190 / (download) - annotate - [select for diffs], Wed Aug 11 17:49:27 2004 UTC (10 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.189: +79 -8 lines
Diff to previous 1.189 (colored)

Add two helper functions -- wdc_datain_pio() and wdc_dataout_pio() -- which
encapsulate the logic for the various methods of transferring data.  Use these
throughout.

Revision 1.189 / (download) - annotate - [select for diffs], Tue Aug 10 23:09:39 2004 UTC (10 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.188: +5 -12 lines
Diff to previous 1.188 (colored)

Hold a reference between atabus_attach() and atabusconfig() to avoid an extra
enable/disable cycle.  Now my CF card attaches a bit faster.

XXX This code is split strangely between files.

Revision 1.188 / (download) - annotate - [select for diffs], Tue Aug 10 02:40:51 2004 UTC (10 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.187: +9 -2 lines
Diff to previous 1.187 (colored)

Be robust against the case of the child devices failing to decrement the
refcnt.

Revision 1.187 / (download) - annotate - [select for diffs], Wed Aug 4 22:44:04 2004 UTC (10 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.186: +31 -21 lines
Diff to previous 1.186 (colored)

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.186 / (download) - annotate - [select for diffs], Wed Aug 4 18:24:11 2004 UTC (10 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.185: +78 -26 lines
Diff to previous 1.185 (colored)

Add
struct ata_xfer *active_xfer
to ata_queue. Now the active xfer isn't the head of the queue any more,
this makes a few things easier (this will also help for tagged queuing
support).
Remove the WDCF_ACTIVE flag, test active_xfer != NULL instead.
clean up wdc_free_xfer() and kill_xfer().
Clean up wdc_reset_channel(), and make it issue a ATAPI_SOFT_RESET if the
active command is ATAPI.
In wdc_atapi_get_params(), use AT_WAIT | AT_POLL for ATAPI_SOFT_RESET,
so that we'll use tsleep() instead of delay().
In wdc_atapi_start(), call wdc_dmawait() at the right place.

Revision 1.123.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:46:21 2004 UTC (10 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.123: +1087 -678 lines
Diff to previous 1.123 (colored)

Sync with HEAD

Revision 1.185 / (download) - annotate - [select for diffs], Mon Aug 2 22:20:54 2004 UTC (10 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.184: +8 -7 lines
Diff to previous 1.184 (colored)

Make it possible for (*dma_finish)() to abort quietly a DMA op. Use this
in wdc_reset_channel().

Revision 1.184 / (download) - annotate - [select for diffs], Mon Aug 2 22:02:35 2004 UTC (10 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.183: +55 -23 lines
Diff to previous 1.183 (colored)

Clean up interraction between wdc_reset_channel and the kernel thread.
Move kill_xfer() after the reset, and stop the DMA engine if needed
(this will unload the DMA maps).

Revision 1.183 / (download) - annotate - [select for diffs], Sun Aug 1 21:40:41 2004 UTC (10 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.182: +17 -12 lines
Diff to previous 1.182 (colored)

Implement an atabus control device, and define some ATA bus control
IOCTLS. Implement ATABUSIORESET, which will reset the given ATA bus.

Revision 1.182 / (download) - annotate - [select for diffs], Sat Jul 31 21:26:42 2004 UTC (10 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.181: +80 -21 lines
Diff to previous 1.181 (colored)

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.172.2.4 / (download) - annotate - [select for diffs], Thu Jun 24 13:57:07 2004 UTC (10 years, 3 months ago) by he
Branch: netbsd-2-0
Changes since 1.172.2.3: +4 -2 lines
Diff to previous 1.172.2.3 (colored) to branchpoint 1.172 (colored)

Pull up revision 1.181 (requested by bouyer in ticket #543):
  For now, remove the ATAPI_SOFT_RESET done at attach time,
  which was added to get an IBM pcmcia external cdrom drive
  working.  However, this appears to cause trouble for other
  IDE/ATAPI devices.

Revision 1.181 / (download) - annotate - [select for diffs], Wed Jun 23 21:10:52 2004 UTC (10 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.180: +4 -2 lines
Diff to previous 1.180 (colored)

For now, remove the ATAPI_SOFT_RESET done at attach time. I added this to get a
IBM pcmcia external cdrom drive working, but it cause troubles for others
IDE/ATAPI devices. Need to find another way to get this IBM drive to probe.

Revision 1.180 / (download) - annotate - [select for diffs], Tue Jun 1 19:32:30 2004 UTC (10 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.179: +6 -19 lines
Diff to previous 1.179 (colored)

Only downgrade modes due to an actual CRC error.  Downgrading on other errors
is anti-social -- especially given that there's no way to upgrade again short
of rebooting.

Also, downgrade UDMA modes more slowly.  It's entirely possible that they're
using an 80-wire cable, but it's just too long for the higher modes, or there
is minor crosstalk.

Revision 1.172.2.3 / (download) - annotate - [select for diffs], Sat May 29 14:10:40 2004 UTC (10 years, 4 months ago) by tron
Branch: netbsd-2-0
Changes since 1.172.2.2: +4 -2 lines
Diff to previous 1.172.2.2 (colored) to branchpoint 1.172 (colored)

Pull up revision 1.175 (requested by bouyer in ticket #397):
Add a delay(5000) between the ATAPI_SOFT_RESET and the channel reset.
Some ATAPI device never get out of busy if touched too fast after a reset.
Delay value from atapi_wdc.c; fix problem reported by Nicolas Joly on
current-users.

Revision 1.172.2.2 / (download) - annotate - [select for diffs], Sat May 29 14:08:18 2004 UTC (10 years, 4 months ago) by tron
Branch: netbsd-2-0
Changes since 1.172.2.1: +178 -67 lines
Diff to previous 1.172.2.1 (colored) to branchpoint 1.172 (colored)

Pull up revision 1.174 (requested by bouyer in ticket #397):
In wdcprobe1(), protect the register writability test with splbio().
What we do here seems to trigger interrupts on some pcmcia adapters, which
cause the kernel to hang.
Add some WDCDEBUG_PRINT((), DEBUG_PROBE).
Avoid touching registers of nonexistent drives, once we know which drive is
or is not here.
This makes the "IBM PCMCIA Portable CD-ROM Drive" (external CD drive with
PCMCIA adapter) work.

Revision 1.172.2.1 / (download) - annotate - [select for diffs], Sat May 29 14:05:54 2004 UTC (10 years, 4 months ago) by tron
Branch: netbsd-2-0
Changes since 1.172: +3 -2 lines
Diff to previous 1.172 (colored)

Pull up revision 1.173 (requested by bouyer in ticket #396):
Add a delay(10) after re-enabling interrupts in the control register.
Some controllers/drives (e.g. SataLink 3114 with WD Raptor) require
it. Should fix kern/23808 by Chris Gilbert, patch suplied by Chris Gilbert
on tech-kern, extended to all places enabling interrupts by me.

Revision 1.179 / (download) - annotate - [select for diffs], Thu May 27 16:47:35 2004 UTC (10 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.178: +17 -17 lines
Diff to previous 1.178 (colored)

Write the registers in the proscribed order -- sector,cyllo,cylhi (LSB first
for LBA).  This make no difference with real devices, but the funky IDE
analyzer can't search properly if the order is wrong.

Revision 1.178 / (download) - annotate - [select for diffs], Thu May 27 02:23:12 2004 UTC (10 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.177: +9 -9 lines
Diff to previous 1.177 (colored)

Clean-up of use of "precomp".  It is used as "features" everywhere, so
rename the fields in wdc_command as appropriate.

Revision 1.177 / (download) - annotate - [select for diffs], Thu May 27 02:09:26 2004 UTC (10 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.176: +4 -4 lines
Diff to previous 1.176 (colored)

In wdcccommand(), load wd_features, not wd_precomp, with the features
provided by callers.

From Jordan Rhody @ Wasabi.

Revision 1.176 / (download) - annotate - [select for diffs], Tue May 25 20:42:41 2004 UTC (10 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.175: +13 -2 lines
Diff to previous 1.175 (colored)

Add the notion of "shadow registers" to the wdc driver.  These shadow
registers are registers that overlap with others on many controllers, but
which may actually be distinct on some controllers.  Right now, the two
shadows are:

- wd_status (usually overlaps wd_command)
- wd_features (usually overlaps wd_error)

Add a new helper function, wdc_init_shadow_regs(), used to initialize
the shadow register handles on controllers where they do actually overlap.

Partially from Jordan Rhody @ Wasabi Systems, Inc.

Revision 1.175 / (download) - annotate - [select for diffs], Mon May 24 20:45:30 2004 UTC (10 years, 4 months ago) by bouyer
Branch: MAIN
Changes since 1.174: +4 -2 lines
Diff to previous 1.174 (colored)

Add a delay(5000) between the ATAPI_SOFT_RESET and the channel reset.
Some ATAPI device never get out of busy if touched too fast after a reset.
Delay value from atapi_wdc.c; fix problem reported by Nicolas Joly on
current-users.

Revision 1.174 / (download) - annotate - [select for diffs], Sat May 15 17:15:09 2004 UTC (10 years, 5 months ago) by bouyer
Branch: MAIN
Changes since 1.173: +180 -69 lines
Diff to previous 1.173 (colored)

In wdcprobe1(), protect the register writability test with splbio().
What we do here seems to trigger interrupts on some pcmcia adapters, which
cause the kernel to hang.
Add some WDCDEBUG_PRINT((), DEBUG_PROBE).
Avoid touching registers of nonexistent drives, once we know which drive is
or is not here.

This makes the "IBM PCMCIA Portable CD-ROM Drive" (external CD drive with
PCMCIA adapter) work.

Revision 1.173 / (download) - annotate - [select for diffs], Sat May 8 15:03:32 2004 UTC (10 years, 5 months ago) by bouyer
Branch: MAIN
Changes since 1.172: +3 -2 lines
Diff to previous 1.172 (colored)

Add a delay(10) after re-enabling interrupts in the control register.
Some controllers/drives (e.g. SataLink 3114 with WD Raptor) require
it. Should fix kern/23808 by Chris Gilbert, patch suplied by Chris Gilbert
on tech-kern, extended to all places enabling interrupts by me.

Revision 1.114.4.4 / (download) - annotate - [select for diffs], Sun Mar 28 22:24:10 2004 UTC (10 years, 6 months ago) by jmc
Branch: netbsd-1-6
Changes since 1.114.4.3: +3 -3 lines
Diff to previous 1.114.4.3 (colored) to branchpoint 1.114 (colored) next main 1.115 (colored)

Pullup patch (requested by bouyer in ticket #1637)

Wait a bit more after reset before re-enabling interrupts. PR#24904

Revision 1.172 / (download) - annotate - [select for diffs], Thu Mar 25 19:45:09 2004 UTC (10 years, 6 months ago) by bouyer
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.171: +5 -2 lines
Diff to previous 1.171 (colored)

Deassert RST before re-enabling interrupts. Some drives (or controller)
require it.
From Michael van Elst in kern/24904.

Revision 1.171 / (download) - annotate - [select for diffs], Wed Jan 7 22:03:56 2004 UTC (10 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.170: +4 -2 lines
Diff to previous 1.170 (colored)

Add a comment about some code that should be cleaned up.

Revision 1.170 / (download) - annotate - [select for diffs], Sat Jan 3 23:59:58 2004 UTC (10 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.169: +4 -4 lines
Diff to previous 1.169 (colored)

More structure member namespace cleanup: thread -> ch_thread

Revision 1.169 / (download) - annotate - [select for diffs], Sat Jan 3 22:56:53 2004 UTC (10 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.168: +144 -121 lines
Diff to previous 1.168 (colored)

More wdc_channel structure member namespace cleanup:
- channel -> ch_channel
- wdc -> ch_wdc

Revision 1.168 / (download) - annotate - [select for diffs], Sat Jan 3 01:50:53 2004 UTC (10 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.167: +43 -43 lines
Diff to previous 1.167 (colored)

Rename "struct channel_softc" to "struct wdc_channel".

Revision 1.167 / (download) - annotate - [select for diffs], Thu Jan 1 21:18:28 2004 UTC (10 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.166: +25 -26 lines
Diff to previous 1.166 (colored)

Tidy this file up a little.

Revision 1.166 / (download) - annotate - [select for diffs], Thu Jan 1 20:25:22 2004 UTC (10 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.165: +4 -4 lines
Diff to previous 1.165 (colored)

Prepend "wdc_" to wait_for_drq, wait_for_unbusy, and wait_for_ready.

Revision 1.165 / (download) - annotate - [select for diffs], Thu Jan 1 17:18:53 2004 UTC (10 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.164: +59 -57 lines
Diff to previous 1.164 (colored)

Rename:
- wdc_xfer to ata_xfer
- channel_queue to ata_queue
and move them to <dev/ata/atavar.h> so they can be used by non-wdc ATA
controllers.  Clean up the member names of these structures while at it.

Revision 1.164 / (download) - annotate - [select for diffs], Tue Dec 30 17:18:11 2003 UTC (10 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.163: +36 -26 lines
Diff to previous 1.163 (colored)

Move the drive probing code out of atabusconfig() and into a new
wdc_drvprobe() function.  wdc_drvprobe() is used if the controller
does not specify a custom one prior to calling wdcattach().  The
WDC_CAPABILITY_DRVPROBE bit is gone.

Revision 1.163 / (download) - annotate - [select for diffs], Tue Dec 30 16:40:12 2003 UTC (10 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.162: +49 -103 lines
Diff to previous 1.162 (colored)

Use ANSI function decls.

Revision 1.162 / (download) - annotate - [select for diffs], Tue Dec 30 16:28:37 2003 UTC (10 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.161: +23 -292 lines
Diff to previous 1.161 (colored)

Move most of the atabus layer into ata.c.

Revision 1.161 / (download) - annotate - [select for diffs], Mon Dec 15 00:27:13 2003 UTC (10 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.160: +9 -3 lines
Diff to previous 1.160 (colored)

Add a (*drv_probe)() optional callback into the driver to probe for
drives on a channel.  Drivers should provide this if they have some
sort of intelligent probing mechanism.

Revision 1.160 / (download) - annotate - [select for diffs], Sun Dec 14 18:51:10 2003 UTC (10 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.159: +6 -6 lines
Diff to previous 1.159 (colored)

Rename __wdcprobe() to wdcprobe1().

Revision 1.159 / (download) - annotate - [select for diffs], Sun Dec 14 05:35:06 2003 UTC (10 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.158: +2 -3 lines
Diff to previous 1.158 (colored)

No need to include wdvar.h anymore.

Revision 1.158 / (download) - annotate - [select for diffs], Sat Nov 29 16:17:31 2003 UTC (10 years, 10 months ago) by he
Branch: MAIN
Changes since 1.157: +3 -3 lines
Diff to previous 1.157 (colored)

Patterned after the rest of the code, add one more check that
chp->wdc is non-null before de-referencing it.

Revision 1.157 / (download) - annotate - [select for diffs], Thu Nov 27 23:02:40 2003 UTC (10 years, 10 months ago) by fvdl
Branch: MAIN
Changes since 1.156: +161 -133 lines
Diff to previous 1.156 (colored)

There are some cards that map the ATA control and IDE DMA registers
in a different fashion. Individually, they have the same functionality,
but their layout is different. An example of such a chipset is
the Promise 203xx.

To be able to deal with this, transform the cmd and dma bus_space handles
into an array of handles, each seperately created with bus_space_subregion.
The code generated by using the extra indirection shouldn't change much,
since the extra indirection is negated by having the offset calculation
already done in bus_space_subregion. E.g.

	bus_space_write_4(tag, handle, offset, value)

becomes

	bus_space_write_4(tag, handles[offset], 0, value)

Reviewed by Manuel Bouyer. Tested on wdc_isa, wdc_pcmcia, viaide, piixide (i386)
and on cmdide (sparc64).

Revision 1.156 / (download) - annotate - [select for diffs], Tue Nov 25 21:03:15 2003 UTC (10 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.155: +17 -2 lines
Diff to previous 1.155 (colored)

Some combination of controller/drive sends a continous stream of
interrupt while SRST is asserted. Work around by blocking interrupts while
SRST is asserted, and clearing any pending interrupt before unblocking.
Fix kern/23529 from Michael Hertrick.

Revision 1.155 / (download) - annotate - [select for diffs], Mon Nov 17 20:01:35 2003 UTC (10 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.154: +9 -5 lines
Diff to previous 1.154 (colored)

Clear DRIVE_ATA|DRIVE_ATAPI for both drives only when we're sure this is
an old drive. Should fix kern/23468.
When we know there's no drive here, abort the probe and try next drive.

Revision 1.154 / (download) - annotate - [select for diffs], Thu Nov 13 22:18:10 2003 UTC (10 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.153: +5 -3 lines
Diff to previous 1.153 (colored)

If we detected an old drive on a channel, clear (ATA|ATAPI) for both
drives on the channel.

Revision 1.153 / (download) - annotate - [select for diffs], Fri Nov 7 08:58:33 2003 UTC (10 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.152: +6 -2 lines
Diff to previous 1.152 (colored)

If we already have a channel reset pending, don't try to queue a new one.
Otherwise we would bump queue_freeze several times, but the kernel thread would
decrease it only one time.
Fix PR kern/23377 by Mattias Karlsson, and should also fix similar problem
reported by Mihai CHELARU and Bruce J.A. Nourish on current-users.

Revision 1.152 / (download) - annotate - [select for diffs], Sun Nov 2 11:07:46 2003 UTC (10 years, 11 months ago) by wiz
Branch: MAIN
Changes since 1.151: +5 -5 lines
Diff to previous 1.151 (colored)

Fix some typos. From Tom Cosgrove via jmc@openbsd.

Revision 1.151 / (download) - annotate - [select for diffs], Fri Oct 31 21:25:09 2003 UTC (10 years, 11 months ago) by briggs
Branch: MAIN
Changes since 1.150: +4 -3 lines
Diff to previous 1.150 (colored)

Use aprint_*(9) instead of printf() in attach routines.

Revision 1.150 / (download) - annotate - [select for diffs], Thu Oct 30 01:58:17 2003 UTC (10 years, 11 months ago) by simonb
Branch: MAIN
Changes since 1.149: +3 -4 lines
Diff to previous 1.149 (colored)

Remove some assigned-to but otherwise unused variables.

Revision 1.149 / (download) - annotate - [select for diffs], Wed Oct 29 22:09:41 2003 UTC (10 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.148: +5 -10 lines
Diff to previous 1.148 (colored)

Remove check for the error register value at probe time. There have been report
on -current-users of some drives not returning the proper value here.
This shouldn't affect the probe time for the common cases.

Revision 1.148 / (download) - annotate - [select for diffs], Wed Oct 29 22:05:15 2003 UTC (10 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.147: +15 -15 lines
Diff to previous 1.147 (colored)

freese->freeze, as pointed out by Frederick Bruck.

Revision 1.147 / (download) - annotate - [select for diffs], Wed Oct 29 21:44:41 2003 UTC (10 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.146: +25 -14 lines
Diff to previous 1.146 (colored)

- test if we have some work to do before tsleep() in the kernel thread,
  in case the previous loop scheduled some more work to do (e.g. reset)
- use queue_freese to block the queue when a reset is pending too
- Avoid using WDCF_TH_RUN in some place that can be called from callout.
  If the kernel thread is tsleep()ing somewhere, we may come here with
  WDCF_TH_RUN set while being in the callout context. Fix a panic() in
  tsleep() reported by Chuck Silvers.
- Use AT_WAIT instead of WDCF_TH_RUN wdcwait(), as we may not be in the
  channel's thread context but still be able to tsleep(). Fix queue_freese
  panics for WDC_CAPABILITY_NOIRQ controllers (port-mac68k/23208 by
  Frederick Bruck).

Revision 1.146 / (download) - annotate - [select for diffs], Sat Oct 25 08:37:00 2003 UTC (10 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.145: +5 -5 lines
Diff to previous 1.145 (colored)

more uninitialized variables

Revision 1.145 / (download) - annotate - [select for diffs], Sat Oct 25 08:30:46 2003 UTC (10 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.144: +3 -3 lines
Diff to previous 1.144 (colored)

fix uninitialized variables

Revision 1.144 / (download) - annotate - [select for diffs], Wed Oct 22 23:59:00 2003 UTC (11 years ago) by briggs
Branch: MAIN
Changes since 1.143: +17 -8 lines
Diff to previous 1.143 (colored)

Avoid a race condition that could allow a removable controller (such as
a compact flash card) to lock the atabus thread if it gets detached during
the probe process.

Revision 1.143 / (download) - annotate - [select for diffs], Wed Oct 15 20:29:26 2003 UTC (11 years ago) by bouyer
Branch: MAIN
Changes since 1.142: +4 -4 lines
Diff to previous 1.142 (colored)

Make sure chp->atabus is initialised, and wakeup the right address when
shutting down the kernel thread.

Revision 1.142 / (download) - annotate - [select for diffs], Wed Oct 15 20:26:33 2003 UTC (11 years ago) by bouyer
Branch: MAIN
Changes since 1.141: +4 -6 lines
Diff to previous 1.141 (colored)

- don't ignore last bit when checking for floating bus value on slave
  device; some ATAPI devices as master will report 0x7f in all registers
  for slave before reset
- For the same reason, remove the er1 check.
Makes slave device with a "strange" ATAPI master probe again.
Problem reported and fix tested by Gary Duzan on current-users.

Revision 1.141 / (download) - annotate - [select for diffs], Wed Oct 15 19:54:30 2003 UTC (11 years ago) by bouyer
Branch: MAIN
Changes since 1.140: +8 -4 lines
Diff to previous 1.140 (colored)

Clear chp->ch_drive[i].drive_flags if we didn't find a driver for the
drive.

Revision 1.140 / (download) - annotate - [select for diffs], Sun Oct 12 19:28:50 2003 UTC (11 years ago) by bouyer
Branch: MAIN
Changes since 1.139: +2 -7 lines
Diff to previous 1.139 (colored)

Remove block that has been pasted twice. Pointed out by Alexander Yurchenko.

Revision 1.139 / (download) - annotate - [select for diffs], Thu Oct 9 18:40:19 2003 UTC (11 years ago) by bouyer
Branch: MAIN
Changes since 1.138: +3 -17 lines
Diff to previous 1.138 (colored)

Remove the check for WAIT+POLL+READ case in __wdccommand_start(),
this case is already handled in __wdccommand_intr().
Pointed out by Charles M. Hannum.

Revision 1.138 / (download) - annotate - [select for diffs], Wed Oct 8 20:58:00 2003 UTC (11 years ago) by bouyer
Branch: MAIN
Changes since 1.137: +4 -4 lines
Diff to previous 1.137 (colored)

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.137 / (download) - annotate - [select for diffs], Wed Oct 8 10:58:12 2003 UTC (11 years ago) by bouyer
Branch: MAIN
Changes since 1.136: +719 -362 lines
Diff to previous 1.136 (colored)

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.136 / (download) - annotate - [select for diffs], Wed Oct 8 08:47:58 2003 UTC (11 years ago) by mycroft
Branch: MAIN
Changes since 1.135: +2 -27 lines
Diff to previous 1.135 (colored)

We really don't need to do 2 resets in wdc_channel_attach() -- the one done
by wdcprobe() is enough.

Revision 1.135 / (download) - annotate - [select for diffs], Mon Oct 6 21:51:31 2003 UTC (11 years ago) by bouyer
Branch: MAIN
Changes since 1.134: +24 -15 lines
Diff to previous 1.134 (colored)

Revert to polling for ata_get_params() in wdc_channel_attach().
When probing a nonexistent slave, we may timeout waiting for an interrupt.
In __wdccommand_start(), for polled data in commands, abort quickly if
status still read 0 after 400ns (for a nonexistant slave, the
command will either be aborted, or the status register will report 0; for
a real device we should have BSY, DRQ or ERR).
Thanks to Alexander Yurchenko for reporting the problem and testing the
fix.

Revision 1.91.2.5 / (download) - annotate - [select for diffs], Mon Oct 6 09:24:57 2003 UTC (11 years ago) by itojun
Branch: netbsd-1-5
Changes since 1.91.2.4: +2 -2 lines
Diff to previous 1.91.2.4 (colored) to branchpoint 1.91 (colored) next main 1.92 (colored)

Fix a typo that prevented pre-ata drives from working since 1999.
[ticket #85, bouyer]

Revision 1.134 / (download) - annotate - [select for diffs], Thu Sep 25 19:29:49 2003 UTC (11 years ago) by mycroft
Branch: MAIN
Changes since 1.133: +29 -4 lines
Diff to previous 1.133 (colored)

Hide the use of config_interrupts() in one place.

Revision 1.133 / (download) - annotate - [select for diffs], Thu Sep 25 09:38:09 2003 UTC (11 years ago) by bouyer
Branch: MAIN
Changes since 1.132: +5 -4 lines
Diff to previous 1.132 (colored)

Don't print modes we are using if we don't know which modes are really used.

Revision 1.114.4.3 / (download) - annotate - [select for diffs], Wed Sep 24 11:16:43 2003 UTC (11 years ago) by tron
Branch: 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
Changes since 1.114.4.2: +1 -1 lines
Diff to previous 1.114.4.2 (colored) to branchpoint 1.114 (colored)

Pull up revision 1.132 (requested by bouyer in ticket #1481):
Fix a typo that prevented pre-ata drives from working since 1999.

Revision 1.132 / (download) - annotate - [select for diffs], Tue Sep 23 16:27:10 2003 UTC (11 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.131: +3 -3 lines
Diff to previous 1.131 (colored)

Fix a typo that prevented pre-ata drives from working since 1999.

Revision 1.131 / (download) - annotate - [select for diffs], Tue Sep 23 09:19:23 2003 UTC (11 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.130: +52 -65 lines
Diff to previous 1.130 (colored)

Fix more probe delay and/or failure problems:
1) Don't wait for DRQ on an IDENTIFY command -- if it's not set when we see
   BSY clear, abort the command and ignore the drive.  (Do this by testing
   for DRQ in the read/write cases in __wdccommand_intr().)
2) Don't wait for DRQ to deassert when we finish an IDENTIFY (or any other
   non-block command that reads data) -- we don't do this for block I/O, and
   empirically it doesn't clear on my CF cards at all, causing a pointless 1s
   delay.
3) Add comments to some of the delay()s, and add missing ones in wdcreset()
   and the WDCC_RECAL in the so-called "pre-ATA" probe.
4) Slightly simplify the reset sequence -- we were doing an extra I/O.
5) Modify the register writability test to make sure that registers are not
   overlapped -- this can happen in some weird cases with a missing device 1.
6) Check the error register value after the reset -- if it's not 01h or 81h,
   as appropriate (see ATA spec), punt.
Tested with a number of ATA-only, ATAPI-only, mixed ATA-ATAPI, CF, and IDE
disk configurations.

Also remove the SINGLE_DRIVE nonsense again.

Revision 1.130 / (download) - annotate - [select for diffs], Sun Sep 21 11:56:40 2003 UTC (11 years, 1 month ago) by enami
Branch: MAIN
Changes since 1.129: +4 -4 lines
Diff to previous 1.129 (colored)

Correctly resurrect the style in previous.  While I'm here, also removed
whitespace at the end of line in comment.

Revision 1.129 / (download) - annotate - [select for diffs], Sun Sep 21 11:14:00 2003 UTC (11 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.128: +19 -2 lines
Diff to previous 1.128 (colored)

Since we can't detect ghost drives in the wdc back-end, resurect
WDC_CAPABILITY_SINGLE_DRIVE.

Revision 1.128 / (download) - annotate - [select for diffs], Sat Sep 20 21:42:47 2003 UTC (11 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.127: +2 -25 lines
Diff to previous 1.127 (colored)

Remove the "Register ghost test". It won't work, because on ATA register
of both devices are written, and device 0 will respond for device 1 if
device 1 isn't present. Pointed out by Quentin Garnier.
So the only way to know if device 1 is there or not is to send a command, which
is done later.
Detecting the second device here isn't important and won't speed up the probe.
We just need to know if there is at last one device on the bus.

Fix PR kern/22869 from Julio M. Merino Vidal.

Revision 1.127 / (download) - annotate - [select for diffs], Sat Sep 20 07:07:39 2003 UTC (11 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.126: +4 -3 lines
Diff to previous 1.126 (colored)

print the name of the driver that found the ghost

Revision 1.126 / (download) - annotate - [select for diffs], Sat Sep 20 02:19:36 2003 UTC (11 years, 1 month ago) by enami
Branch: MAIN
Changes since 1.125: +10 -9 lines
Diff to previous 1.125 (colored)

Now wdcattach() is called interrupts enabled, config_interrupts() tries to
call ata_raid_check_component() immediately, and panics since DMA setup
isn't done yet.  So, defer the call until attach stage is almost done.
Tested with Promise TX2000.

Revision 1.125 / (download) - annotate - [select for diffs], Fri Sep 19 21:36:02 2003 UTC (11 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.124: +118 -43 lines
Diff to previous 1.124 (colored)

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.124 / (download) - annotate - [select for diffs], Wed Sep 17 11:56:19 2003 UTC (11 years, 1 month ago) by drochner
Branch: MAIN
Changes since 1.123: +3 -3 lines
Diff to previous 1.123 (colored)

typo in comment

Revision 1.123 / (download) - annotate - [select for diffs], Sat May 17 21:52:04 2003 UTC (11 years, 5 months ago) by thorpej
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.122: +31 -26 lines
Diff to previous 1.122 (colored)

* Use aprint*().
* Add Ultra/133 to wdc_print_modes().

Revision 1.122 / (download) - annotate - [select for diffs], Mon Jan 27 18:21:25 2003 UTC (11 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.121: +16 -5 lines
Diff to previous 1.121 (colored)

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.91.2.4 / (download) - annotate - [select for diffs], Thu Jan 23 08:23:14 2003 UTC (11 years, 9 months ago) by msaitoh
Branch: netbsd-1-5
Changes since 1.91.2.3: +33 -1 lines
Diff to previous 1.91.2.3 (colored) to branchpoint 1.91 (colored)

Pull up revision 1.114 (requested by Manuel Bouyer):

 read status after data commands in wdc_exec_command(). Mandatory for data out
 commands (nonw are used for now), and doesn't hurt for data in. Also keep
 track if we did transfer data. Makes the probe more robust and solves
 kern/16159

Revision 1.121 / (download) - annotate - [select for diffs], Mon Jan 20 07:34:37 2003 UTC (11 years, 9 months ago) by simonb
Branch: MAIN
Changes since 1.120: +3 -4 lines
Diff to previous 1.120 (colored)

Remove variable that is only assigned too but not referenced.

Revision 1.94.2.16 / (download) - annotate - [select for diffs], Fri Jan 3 17:07:42 2003 UTC (11 years, 9 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.94.2.15: +4 -4 lines
Diff to previous 1.94.2.15 (colored) next main 1.95 (colored)

Sync with HEAD.

Revision 1.120 / (download) - annotate - [select for diffs], Wed Jan 1 00:10:19 2003 UTC (11 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, fvdl_fs64_base
Changes since 1.119: +4 -4 lines
Diff to previous 1.119 (colored)

Use aprint_normal() in cfprint routines.

Revision 1.94.2.15 / (download) - annotate - [select for diffs], Wed Dec 11 06:38:02 2002 UTC (11 years, 10 months ago) by thorpej
Branch: nathanw_sa
Changes since 1.94.2.14: +1 -1 lines
Diff to previous 1.94.2.14 (colored)

Sync with HEAD.

Revision 1.119 / (download) - annotate - [select for diffs], Fri Dec 6 14:05:34 2002 UTC (11 years, 10 months ago) by drochner
Branch: MAIN
CVS Tags: gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw
Changes since 1.118: +3 -3 lines
Diff to previous 1.118 (colored)

typo in comment

Revision 1.114.4.2 / (download) - annotate - [select for diffs], Fri Nov 1 16:26:23 2002 UTC (11 years, 11 months ago) by tron
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.114.4.1: +2 -0 lines
Diff to previous 1.114.4.1 (colored) to branchpoint 1.114 (colored)

Pull up revision 1.117 (requested by bouyer in ticket #726):
Add support for Ultra/133 (ultra-DMA6) in wdc_probe_caps().

Revision 1.94.2.14 / (download) - annotate - [select for diffs], Fri Oct 18 02:42:02 2002 UTC (12 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.94.2.13: +2 -2 lines
Diff to previous 1.94.2.13 (colored)

Catch up to -current.

Revision 1.98.2.6 / (download) - annotate - [select for diffs], Thu Oct 10 18:39:16 2002 UTC (12 years ago) by jdolecek
Branch: kqueue
Changes since 1.98.2.5: +4 -4 lines
Diff to previous 1.98.2.5 (colored) to branchpoint 1.98 (colored) next main 1.99 (colored)

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

Revision 1.118 / (download) - annotate - [select for diffs], Fri Sep 27 15:37:20 2002 UTC (12 years ago) by provos
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base, kqueue-aftermerge
Changes since 1.117: +4 -4 lines
Diff to previous 1.117 (colored)

remove trailing \n in panic().  approved perry.

Revision 1.98.2.5 / (download) - annotate - [select for diffs], Fri Sep 6 08:44:40 2002 UTC (12 years, 1 month ago) by jdolecek
Branch: kqueue
Changes since 1.98.2.4: +6 -4 lines
Diff to previous 1.98.2.4 (colored) to branchpoint 1.98 (colored)

sync kqueue branch with HEAD

Revision 1.114.2.2 / (download) - annotate - [select for diffs], Thu Aug 29 05:22:33 2002 UTC (12 years, 1 month ago) by gehenna
Branch: gehenna-devsw
Changes since 1.114.2.1: +6 -4 lines
Diff to previous 1.114.2.1 (colored) to branchpoint 1.114 (colored) next main 1.115 (colored)

catch up with -current.

Revision 1.94.2.13 / (download) - annotate - [select for diffs], Tue Aug 27 23:46:44 2002 UTC (12 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.94.2.12: +2 -0 lines
Diff to previous 1.94.2.12 (colored)

Catch up to -current.

Revision 1.117 / (download) - annotate - [select for diffs], Sun Aug 25 17:22:38 2002 UTC (12 years, 1 month ago) by bouyer
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.116: +4 -2 lines
Diff to previous 1.116 (colored)

Add support for Ultra/133 (ultra-DMA6) in wdc_probe_caps().

Revision 1.94.2.12 / (download) - annotate - [select for diffs], Thu Aug 1 02:44:50 2002 UTC (12 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.94.2.11: +4 -4 lines
Diff to previous 1.94.2.11 (colored)

Catch up to -current.

Revision 1.116 / (download) - annotate - [select for diffs], Fri Jul 26 14:10:22 2002 UTC (12 years, 2 months ago) by wiz
Branch: MAIN
Changes since 1.115: +4 -4 lines
Diff to previous 1.115 (colored)

Two typos in comments.

Revision 1.98.2.4 / (download) - annotate - [select for diffs], Sun Jun 23 17:46:56 2002 UTC (12 years, 4 months ago) by jdolecek
Branch: kqueue
Changes since 1.98.2.3: +37 -3 lines
Diff to previous 1.98.2.3 (colored) to branchpoint 1.98 (colored)

catch up with -current on kqueue branch

Revision 1.114.2.1 / (download) - annotate - [select for diffs], Thu Jun 20 16:33:21 2002 UTC (12 years, 4 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.114: +3 -3 lines
Diff to previous 1.114 (colored)

catch up with -current.

Revision 1.94.2.11 / (download) - annotate - [select for diffs], Thu Jun 20 03:45:06 2002 UTC (12 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.94.2.10: +3 -3 lines
Diff to previous 1.94.2.10 (colored)

Catch up to -current.

Revision 1.114.4.1 / (download) - annotate - [select for diffs], Thu Jun 13 02:35:20 2002 UTC (12 years, 4 months ago) by lukem
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1
Changes since 1.114: +3 -3 lines
Diff to previous 1.114 (colored)

Pull up revision 1.115 (requested by bouyer in ticket #256):
Bump delay() between reset and IDENTIFY from 100 to 5000. Some ATAPI devices
wedge when talking to them too soon, and incorrectly react to WDC_RESET.
Close PR kern/17208 by Paul Goyette.

Revision 1.115 / (download) - annotate - [select for diffs], Wed Jun 12 09:55:47 2002 UTC (12 years, 4 months ago) by bouyer
Branch: MAIN
Changes since 1.114: +3 -3 lines
Diff to previous 1.114 (colored)

Bump delay() between reset and IDENTIFY from 100 to 5000. Some ATAPI devices
wedge when talking to them too soon, and incorrectly react to WDC_RESET.
Close PR kern/17208 by Paul Goyette.

Revision 1.94.2.10 / (download) - annotate - [select for diffs], Wed Apr 17 00:05:52 2002 UTC (12 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.94.2.9: +34 -0 lines
Diff to previous 1.94.2.9 (colored)

Catch up to -current.

Revision 1.114 / (download) - annotate - [select for diffs], Tue Apr 9 21:17:54 2002 UTC (12 years, 6 months ago) by bouyer
Branch: MAIN
CVS Tags: netbsd-1-6-base
Branch point for: netbsd-1-6, gehenna-devsw
Changes since 1.113: +34 -2 lines
Diff to previous 1.113 (colored)

In wdc_exec_command(), for data commands, read the status register after
the data transfer. This is mandatory for data out commands (although none are
used for now), and not forbiddend for data in commands. Also record if we
did transfers any data.
May solve kern/16159 by making the probe more robust in face of fake identify.

Revision 1.94.2.9 / (download) - annotate - [select for diffs], Mon Apr 1 07:45:44 2002 UTC (12 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.94.2.8: +3 -6 lines
Diff to previous 1.94.2.8 (colored)

Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.113 / (download) - annotate - [select for diffs], Thu Mar 28 22:51:58 2002 UTC (12 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.112: +4 -2 lines
Diff to previous 1.112 (colored)

In wdcintr(), it !WDCF_IRQ_WAIT, read the status register anyway to clear a
possible pending interrupt. This should avoid the interrupt loop described
in PR kern/15841.
It is safe to read status here, because if we're not waiting for an interrupt
we have no command pending, so the device should be idle.

Revision 1.98.2.3 / (download) - annotate - [select for diffs], Sat Mar 16 16:01:03 2002 UTC (12 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.98.2.2: +3 -6 lines
Diff to previous 1.98.2.2 (colored) to branchpoint 1.98 (colored)

Catch up with -current.

Revision 1.112 / (download) - annotate - [select for diffs], Fri Mar 8 20:48:38 2002 UTC (12 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: newlock-base, newlock, eeh-devprop-base, eeh-devprop
Changes since 1.111: +3 -3 lines
Diff to previous 1.111 (colored)

Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.

Revision 1.111 / (download) - annotate - [select for diffs], Mon Mar 4 02:19:10 2002 UTC (12 years, 7 months ago) by simonb
Branch: MAIN
Changes since 1.110: +2 -5 lines
Diff to previous 1.110 (colored)

Don't "extern int cold;" - this is in <sys/kernel.h>.

Revision 1.94.2.8 / (download) - annotate - [select for diffs], Thu Feb 28 04:13:31 2002 UTC (12 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.94.2.7: +2 -2 lines
Diff to previous 1.94.2.7 (colored)

Catch up to -current.

Revision 1.94.2.7 / (download) - annotate - [select for diffs], Sat Feb 23 22:55:58 2002 UTC (12 years, 7 months ago) by gmcgarry
Branch: nathanw_sa
Changes since 1.94.2.6: +49 -6 lines
Diff to previous 1.94.2.6 (colored)

Merge up from -current.

Revision 1.98.2.2 / (download) - annotate - [select for diffs], Mon Feb 11 20:09:48 2002 UTC (12 years, 8 months ago) by jdolecek
Branch: kqueue
Changes since 1.98.2.1: +49 -6 lines
Diff to previous 1.98.2.1 (colored) to branchpoint 1.98 (colored)

Sync w/ -current.

Revision 1.110 / (download) - annotate - [select for diffs], Thu Jan 31 06:37:30 2002 UTC (12 years, 8 months ago) by simonb
Branch: MAIN
CVS Tags: ifpoll-base, ifpoll
Changes since 1.109: +3 -3 lines
Diff to previous 1.109 (colored)

White-space niggle.

Revision 1.91.2.3 / (download) - annotate - [select for diffs], Tue Jan 22 19:41:44 2002 UTC (12 years, 9 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003
Changes since 1.91.2.2: +4 -4 lines
Diff to previous 1.91.2.2 (colored) to branchpoint 1.91 (colored)

Pull up revision 1.109 (via patch, requested by bouyer):
  Don't try to use chp->wdc if it's NULL.  Fixes PR#15307.

Revision 1.91.2.2 / (download) - annotate - [select for diffs], Wed Jan 16 10:15:30 2002 UTC (12 years, 9 months ago) by he
Branch: netbsd-1-5
Changes since 1.91.2.1: +34 -1 lines
Diff to previous 1.91.2.1 (colored) to branchpoint 1.91 (colored)

Pull up revision 1.107 (via patch, requested by dbj):
  Add UDMA support and allow separate DMA timings to be programmed
  for two different devices on the same wdc channel on the macppc.
  The machine-independent driver is updated to optionally use the
  WDC_CAPABILITY_SELECT callback whenever a target is selected on
  a channel.

Revision 1.109 / (download) - annotate - [select for diffs], Mon Jan 14 21:51:35 2002 UTC (12 years, 9 months ago) by bouyer
Branch: MAIN
Changes since 1.108: +5 -5 lines
Diff to previous 1.108 (colored)

Don't use chp->wdc if it's NULL.

Revision 1.108 / (download) - annotate - [select for diffs], Sun Jan 13 17:24:28 2002 UTC (12 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.107: +45 -2 lines
Diff to previous 1.107 (colored)

Add LBA48 support based on patches from Keisuke YOSHIDA. KNF a bit while
I am there.

Revision 1.94.2.6 / (download) - annotate - [select for diffs], Fri Jan 11 23:39:01 2002 UTC (12 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.94.2.5: +35 -2 lines
Diff to previous 1.94.2.5 (colored)

More catchup.

Revision 1.98.2.1 / (download) - annotate - [select for diffs], Thu Jan 10 19:55:09 2002 UTC (12 years, 9 months ago) by thorpej
Branch: kqueue
Changes since 1.98: +80 -38 lines
Diff to previous 1.98 (colored)

Sync kqueue branch with -current.

Revision 1.94.2.5 / (download) - annotate - [select for diffs], Tue Jan 8 00:30:11 2002 UTC (12 years, 9 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.94.2.4: +42 -38 lines
Diff to previous 1.94.2.4 (colored)

Catch up to -current.

Revision 1.107 / (download) - annotate - [select for diffs], Mon Jan 7 22:11:17 2002 UTC (12 years, 9 months ago) by dbj
Branch: MAIN
Changes since 1.106: +35 -2 lines
Diff to previous 1.106 (colored)

Changes to the wdc(4) mi driver that add the WDC_CAPABILITY_SELECT
flag and a callback function which gets called whenever a target is
selected on a channel.

The macppc wdc driver needs to reprogram its timing register
differently for each target on a channel each time that target is
selected.  I also changed the ATA4_TIME_TO_TICK to use a divisor of
15, which brings our timing calculations consistent with darwin.

These patches fix problems on my dual usb ibook with combo dvd/cdrw
drive because the hard drive supports udma and the combo drive does
not.  Without turning off the udma timings in the configuration
register, I cannot access the non-udma combo drive.

Revision 1.91.2.1 / (download) - annotate - [select for diffs], Sat Jan 5 18:03:30 2002 UTC (12 years, 9 months ago) by he
Branch: netbsd-1-5
Changes since 1.91: +5 -1 lines
Diff to previous 1.91 (colored)

Pull up revision 1.101 (requested by bouyer):
  Do not allow forcing Ultra-DMA via config flags if the controller
  does not support it.

Revision 1.106 / (download) - annotate - [select for diffs], Wed Dec 5 20:43:00 2001 UTC (12 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.105: +18 -3 lines
Diff to previous 1.105 (colored)

Compile with NWD == 0. Fixe kern/14844 by hamajima@nagoya.ydc.co.jp.

Revision 1.105 / (download) - annotate - [select for diffs], Mon Dec 3 11:07:34 2001 UTC (12 years, 10 months ago) by enami
Branch: MAIN
Changes since 1.104: +3 -3 lines
Diff to previous 1.104 (colored)

Use correct format letter for chp->channel.

Revision 1.104 / (download) - annotate - [select for diffs], Mon Dec 3 00:20:23 2001 UTC (12 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.103: +3 -3 lines
Diff to previous 1.103 (colored)

Update my copyrigth.

Revision 1.103 / (download) - annotate - [select for diffs], Mon Dec 3 00:11:17 2001 UTC (12 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.102: +4 -5 lines
Diff to previous 1.102 (colored)

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.102 / (download) - annotate - [select for diffs], Sun Dec 2 22:44:33 2001 UTC (12 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.101: +21 -35 lines
Diff to previous 1.101 (colored)

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.101 / (download) - annotate - [select for diffs], Wed Nov 14 20:18:11 2001 UTC (12 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.100: +6 -2 lines
Diff to previous 1.100 (colored)

If the controller doesn't support UDMA, don't allow enabling UDMA via
config flags.

Revision 1.94.2.4 / (download) - annotate - [select for diffs], Wed Nov 14 19:14:41 2001 UTC (12 years, 11 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.94.2.3: +4 -1 lines
Diff to previous 1.94.2.3 (colored)

Catch up to -current.

Revision 1.100 / (download) - annotate - [select for diffs], Tue Nov 13 13:14:46 2001 UTC (12 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.99: +4 -1 lines
Diff to previous 1.99 (colored)

add/cleanup RCSID

Revision 1.98.4.1 / (download) - annotate - [select for diffs], Mon Oct 1 12:45:43 2001 UTC (13 years ago) by fvdl
Branch: thorpej-devvp
Changes since 1.98: +4 -2 lines
Diff to previous 1.98 (colored) next main 1.99 (colored)

Catch up with -current.

Revision 1.94.2.3 / (download) - annotate - [select for diffs], Fri Sep 21 22:35:45 2001 UTC (13 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.94.2.2: +4 -2 lines
Diff to previous 1.94.2.2 (colored)

Catch up to -current.

Revision 1.99 / (download) - annotate - [select for diffs], Tue Sep 18 05:32:14 2001 UTC (13 years, 1 month ago) by chs
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3, thorpej-devvp-base2
Changes since 1.98: +4 -2 lines
Diff to previous 1.98 (colored)

in wdc_get_xfer(), avoid crashing if pool_get() fails.

Revision 1.94.2.2 / (download) - annotate - [select for diffs], Thu Jun 21 20:03:28 2001 UTC (13 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.94.2.1: +21 -15 lines
Diff to previous 1.94.2.1 (colored)

Catch up to -current.

Revision 1.98 / (download) - annotate - [select for diffs], Wed Jun 13 18:17:38 2001 UTC (13 years, 4 months ago) by bjh21
Branch: MAIN
CVS Tags: thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp, kqueue
Changes since 1.97: +5 -1 lines
Diff to previous 1.97 (colored)

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.97 / (download) - annotate - [select for diffs], Mon Jun 11 21:18:36 2001 UTC (13 years, 4 months ago) by bjh21
Branch: MAIN
Changes since 1.96: +6 -4 lines
Diff to previous 1.96 (colored)

Add a short-circuit return from wdcprobe for IDE controllers without pullup
resistors, which return the last value written to the bus on a read.  This
makes detecting empty channels on my HCCS and D.T. Software IDE interfaces
rather faster.

Revision 1.96 / (download) - annotate - [select for diffs], Wed Apr 25 17:53:35 2001 UTC (13 years, 5 months ago) by bouyer
Branch: MAIN
Changes since 1.95: +12 -12 lines
Diff to previous 1.95 (colored)

Pull up the thorpej_scsipi branch to main branch.
This is a completely rewritten scsipi_xfer execution engine, and the
associated changes to HBA drivers. Overview of changes & features:
- All xfers are queued in the mid-layer, rather than doing so in an
  ad-hoc fashion in individual adapter drivers.
- Adapter/channel resource management in the mid-layer, avoids even trying
  to start running an xfer if the adapter/channel doesn't have the resources.
- Better communication between the mid-layer and the adapters.
- Asynchronous event notification mechanism from adapter to mid-layer and
  peripherals.
- Better peripheral queue management: freeze/thaw, sorted requeueing during
  recovery, etc.
- Clean separation of peripherals, adapters, and adapter channels (no more
  scsipi_link).
- Kernel thread for each scsipi_channel makes error recovery much easier
  (no more dealing with interrupt context when recovering from an error).
- Mid-layer support for tagged queueing: commands can have the tag type
  set explicitly, tag IDs are allocated in the mid-layer (thus eliminating
  the need to use buggy tag ID allocation schemes in many adapter drivers).
- support for QUEUE FULL and CHECK CONDITION status in mid-layer; the command
  will be requeued, or a REQUEST SENSE will be sent as appropriate.

Just before the merge syssrc has been tagged with thorpej_scsipi_beforemerge

Revision 1.94.2.1 / (download) - annotate - [select for diffs], Mon Apr 9 01:56:33 2001 UTC (13 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.94: +2 -1 lines
Diff to previous 1.94 (colored)

Catch up with -current.

Revision 1.74.2.7 / (download) - annotate - [select for diffs], Tue Mar 27 15:32:01 2001 UTC (13 years, 6 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.74.2.6: +2 -1 lines
Diff to previous 1.74.2.6 (colored) next main 1.75 (colored)

Sync with HEAD.

Revision 1.95 / (download) - annotate - [select for diffs], Wed Mar 21 08:44:14 2001 UTC (13 years, 7 months ago) by bouyer
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Changes since 1.94: +2 -1 lines
Diff to previous 1.94 (colored)

Add a small delay before reset at attach time, required by one old ATAPI
CD. Reported by Onno van der Linden.

Revision 1.74.2.6 / (download) - annotate - [select for diffs], Sun Feb 18 18:27:11 2001 UTC (13 years, 8 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.74.2.5: +13 -1 lines
Diff to previous 1.74.2.5 (colored)

Move atapiprint() to ic/wdc.c so that we can compile a kernel with IDE
controller but without atapibus.

Revision 1.74.2.5 / (download) - annotate - [select for diffs], Thu Jan 18 09:23:21 2001 UTC (13 years, 9 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.74.2.4: +17 -0 lines
Diff to previous 1.74.2.4 (colored)

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

Revision 1.94 / (download) - annotate - [select for diffs], Sat Jan 6 14:55:49 2001 UTC (13 years, 9 months ago) by takemura
Branch: MAIN
Branch point for: nathanw_sa
Changes since 1.93: +18 -1 lines
Diff to previous 1.93 (colored)

Add WDC_CAPABILITY_SINGLE_DRIVE to ignore secound drive. Wdc on pcmcia will
be attached with this flag.
Some CF Card (for ex. IBM MicroDrive and SanDisk) doesn't seem to implement
drive select command. In this case, you can't eliminate ghost drive properly.
So you should use this flag to ignore the ghost by force.

Revision 1.74.2.4 / (download) - annotate - [select for diffs], Wed Nov 22 16:03:34 2000 UTC (13 years, 11 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.74.2.3: +38 -1 lines
Diff to previous 1.74.2.3 (colored)

Sync with HEAD.

Revision 1.74.2.3 / (download) - annotate - [select for diffs], Mon Nov 20 11:41:05 2000 UTC (13 years, 11 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.74.2.2: +115 -57 lines
Diff to previous 1.74.2.2 (colored)

Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

Revision 1.93 / (download) - annotate - [select for diffs], Wed Nov 8 17:57:36 2000 UTC (13 years, 11 months ago) by wrstuden
Branch: MAIN
Changes since 1.92: +38 -1 lines
Diff to previous 1.92 (colored)

Move guts of pciide_print_modes() to wdc_print_modes() so that non-pciide
wdc drivers (like macppc's obio IDE interface) can use it. Also add
support to both wd attach line and to wdc_print_modes() to print
Ultra/{33,66,100} for respective UDMA modes (From Manuel Bouyer).

Revision 1.66.2.9 / (download) - annotate - [select for diffs], Fri Jul 7 17:33:48 2000 UTC (14 years, 3 months ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003
Changes since 1.66.2.8: +94 -41 lines
Diff to previous 1.66.2.8 (colored) to branchpoint 1.66 (colored) next main 1.67 (colored)

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.92 / (download) - annotate - [select for diffs], Wed Jun 28 17:13:06 2000 UTC (14 years, 3 months ago) by mrg
Branch: MAIN
Changes since 1.91: +1 -3 lines
Diff to previous 1.91 (colored)

remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>

Revision 1.89.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:06:58 2000 UTC (14 years, 4 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.89: +6 -4 lines
Diff to previous 1.89 (colored) next main 1.90 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.91 / (download) - annotate - [select for diffs], Mon Jun 12 21:10:41 2000 UTC (14 years, 4 months ago) by bouyer
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Changes since 1.90: +3 -1 lines
Diff to previous 1.90 (colored)

Add a callback (*irqack), for controllers that need special action to ack
the interrupt once it has been ack'd on the drive.

Revision 1.90 / (download) - annotate - [select for diffs], Sun Jun 11 17:09:34 2000 UTC (14 years, 4 months ago) by bouyer
Branch: MAIN
Changes since 1.89: +4 -4 lines
Diff to previous 1.89 (colored)

Relax condition on 'sn' for atapi probe, it can be different from 0x1 with
some controllers/devices. Fixes a problem reported by Markus Illenseer.

Revision 1.89 / (download) - annotate - [select for diffs], Fri May 12 15:00:33 2000 UTC (14 years, 5 months ago) by bouyer
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.88: +4 -5 lines
Diff to previous 1.88 (colored)

Accept any 'sc' value when probing atapi drives: with some drives, or
controllers, or combination of both, the value can be different from the
expected one after a reset.

Revision 1.88 / (download) - annotate - [select for diffs], Wed Apr 5 06:27:36 2000 UTC (14 years, 6 months ago) by mrg
Branch: MAIN
Changes since 1.87: +10 -9 lines
Diff to previous 1.87 (colored)

avoid using uninitalised variables inside WDCDEBUG.

Revision 1.87 / (download) - annotate - [select for diffs], Tue Apr 4 12:43:13 2000 UTC (14 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.86: +10 -4 lines
Diff to previous 1.86 (colored)

Add checks to detect busy-waits, conditionnal on new debug flag
DEBUG_DELAY (0x40). This will print how much time we did loop in wdcwait(),
if we had to read registers more than one time.

Revision 1.86 / (download) - annotate - [select for diffs], Tue Apr 4 09:25:51 2000 UTC (14 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.85: +7 -2 lines
Diff to previous 1.85 (colored)

Better fix to previous: delay(100) before the IDENTIFY, and if it fails
delay(1000000) and retry. The 1s delay is needed for some special case only,
no need to hang the machine for that long everytime (especially for PCMCIA).

Revision 1.85 / (download) - annotate - [select for diffs], Sat Apr 1 14:50:32 2000 UTC (14 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.84: +2 -2 lines
Diff to previous 1.84 (colored)

Bump delay() from 100 to 1000000 before attempting a IDENTIFY just after a
reset - solves a problem reported by cpg@aladdin.de.

Revision 1.84 / (download) - annotate - [select for diffs], Sat Apr 1 14:32:22 2000 UTC (14 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.83: +51 -11 lines
Diff to previous 1.83 (colored)

- DMA code cleanup: pciide_dma_finish() doesn't stop/unload the current DMA op
  if an IRQ was not detected, unless the force flag was given. Use this to
  detect if the IRQ was for us (closer to shared IRQ for controllers which
  don't have their own IRQ handler in pciide.c) and to poll for DMA xfer.
  Also makes the timeout recovery code simpler.
- ATAPI cleanup: don't call controller-specific functions from atapiconf.c
  (wdc_*), so that it's possible to attach an atapibus to something else
  than a wdc/pciide (Hi Lennart :).
  Overload struct scsi_adapter with struct atapi_adapter, defined
  as struct scsi_adapter + atapi-specific callbacks. scsipi_link still points
  to an scsi_adapter, atapi code casts it to atapi_adapter if needed.
  Move atapi_softc to atapiconf.h so that it can be used by the underlying
  controller code (e.g. atapi_wdc.c).
  Add an atapi-specific callback *atapi_probedev(), which probe a drive
  in a controller-specific way, allocate the sc_link and fills in the
  ataparams if needed. It then calls atapi_probedev() (from atapiconf.c)
  to do the generic initialisations and attach the device.
- While I'm there merge and centralise the state definitions in atavar.h.
  It should now be possible to use a common ata/atapi routine to set the
  drive's modes (will do later).

Revision 1.83 / (download) - annotate - [select for diffs], Wed Mar 29 03:56:53 2000 UTC (14 years, 6 months ago) by simonb
Branch: MAIN
Changes since 1.82: +1 -2 lines
Diff to previous 1.82 (colored)

Remove reduncdant decl of wdc_kill_pending - it's in <dev/ic/wdcvar.h>.

Revision 1.82 / (download) - annotate - [select for diffs], Thu Mar 23 15:04:49 2000 UTC (14 years, 7 months ago) by soren
Branch: MAIN
Changes since 1.81: +2 -2 lines
Diff to previous 1.81 (colored)

s/32-bits/32-bit/ (Hi Al!)

Revision 1.81 / (download) - annotate - [select for diffs], Thu Mar 23 07:01:33 2000 UTC (14 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.80: +7 -5 lines
Diff to previous 1.80 (colored)

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.80 / (download) - annotate - [select for diffs], Mon Mar 20 22:53:36 2000 UTC (14 years, 7 months ago) by enami
Branch: MAIN
Changes since 1.79: +9 -6 lines
Diff to previous 1.79 (colored)

- Test the generic device active flag instead of home grown one.
- Test also it in wdcintr.

Revision 1.79 / (download) - annotate - [select for diffs], Mon Feb 14 12:37:35 2000 UTC (14 years, 8 months ago) by bouyer
Branch: MAIN
Changes since 1.78: +7 -4 lines
Diff to previous 1.78 (colored)

- Be more strict in status check before sending a command (make sure
  DRQ is not asserted). Closes kern/9346.
- Change the "fake identify before the real one" by a delay(). The real cause
  of the problem is that the drive is unresponsive just after a reset.
  The real problem (and the solution) showed up after the first change.

Revision 1.66.2.8 / (download) - annotate - [select for diffs], Tue Feb 1 23:30:28 2000 UTC (14 years, 8 months ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH002
Changes since 1.66.2.7: +7 -3 lines
Diff to previous 1.66.2.7 (colored) to branchpoint 1.66 (colored)

Pull up revision 1.71 (via patch, requested by bouyer):
  Correct a minor bug in Ultra-DMA mode printing.

Revision 1.66.2.7 / (download) - annotate - [select for diffs], Sun Jan 23 12:30:20 2000 UTC (14 years, 9 months ago) by he
Branch: netbsd-1-4
Changes since 1.66.2.6: +2 -1 lines
Diff to previous 1.66.2.6 (colored) to branchpoint 1.66 (colored)

Pull up revision 1.78 (2nd part, via patch, requested by bouyer):
  Issue a blank IDENTIFY before the real one, for drives which
  reject the first IDENTIFY after a reset.

Revision 1.66.2.6 / (download) - annotate - [select for diffs], Sun Jan 23 12:27:44 2000 UTC (14 years, 9 months ago) by he
Branch: netbsd-1-4
Changes since 1.66.2.5: +20 -3 lines
Diff to previous 1.66.2.5 (colored) to branchpoint 1.66 (colored)

Pull up revision 1.78 (partially, via patch, requested by bouyer):
  Improve the downgrade logic to work better in some cases (especially
  for Acer Labs M5229 controllers with Ultra-DMA/66 disks).

Revision 1.78 / (download) - annotate - [select for diffs], Mon Jan 17 00:01:01 2000 UTC (14 years, 9 months ago) by bouyer
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.77: +13 -5 lines
Diff to previous 1.77 (colored)

Improve the downgrade logic:
- If UDMA 2 is failing try UDMA 1 first, it helps in some cases
- downgrade if we get an error in the first 4000 xfers, or if we get
  4 errors in 4000 xfers if the first 4000 went without troubles.

While I'm there commit a local change I have since some time to get my CD
probed: issue a "blanck" IDENTIFY before the one used to detect slave ghosts,
with my drive the first IDENTIFY following a controller reset fails with an
aborted command ...

Revision 1.74.6.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:34:53 1999 UTC (14 years, 9 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.74: +39 -11 lines
Diff to previous 1.74 (colored) next main 1.75 (colored)

Pull up to last week's -current.

Revision 1.66.2.1.4.1 / (download) - annotate - [select for diffs], Tue Nov 30 13:33:50 1999 UTC (14 years, 10 months ago) by itojun
Branch: kame
CVS Tags: kame_141_19991130
Changes since 1.66.2.1: +23 -2 lines
Diff to previous 1.66.2.1 (colored) next main 1.66.2.2 (colored)

bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

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

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

Revision 1.77 / (download) - annotate - [select for diffs], Sun Nov 28 20:04:22 1999 UTC (14 years, 10 months ago) by bouyer
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221
Changes since 1.76: +8 -8 lines
Diff to previous 1.76 (colored)

Improve a few debug messages.

Revision 1.74.4.1 / (download) - annotate - [select for diffs], Mon Nov 15 00:40:38 1999 UTC (14 years, 11 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.74: +32 -4 lines
Diff to previous 1.74 (colored) next main 1.75 (colored)

Sync with -current

Revision 1.66.2.5 / (download) - annotate - [select for diffs], Fri Oct 22 09:27:19 1999 UTC (15 years ago) by he
Branch: netbsd-1-4
Changes since 1.66.2.4: +6 -2 lines
Diff to previous 1.66.2.4 (colored) to branchpoint 1.66 (colored)

Pull up revision 1.76 (requested by bouyer):
  The WDCF_IRQ_WAIT flag was erroneously cleared when an earlier
  interrupt not for this IDE channel controller was received.
  Fixes the "missing untimeout" problems reported in PR#8639.

Revision 1.76 / (download) - annotate - [select for diffs], Thu Oct 21 14:37:58 1999 UTC (15 years ago) by bouyer
Branch: MAIN
CVS Tags: fvdl-softdep-base, comdex-fall-1999-base, comdex-fall-1999
Changes since 1.75: +6 -2 lines
Diff to previous 1.75 (colored)

If IRQ was not for us, add back WDCF_IRQ_WAIT to the flags, so that
the next IRQ (real or timeout) will be handled.
Fixes the 'missing untimeout' problem reported by a few peoples, and
kern/8639.

Revision 1.74.2.2 / (download) - annotate - [select for diffs], Wed Oct 20 22:33:28 1999 UTC (15 years ago) by thorpej
Branch: thorpej_scsipi
Changes since 1.74.2.1: +27 -3 lines
Diff to previous 1.74.2.1 (colored)

Sync w/ trunk.

Revision 1.75 / (download) - annotate - [select for diffs], Wed Oct 20 15:22:26 1999 UTC (15 years ago) by enami
Branch: MAIN
Changes since 1.74: +27 -3 lines
Diff to previous 1.74 (colored)

Cancel active transfers on aic/wdc detach.
Also makes LS-120 drive works for me again.

Revision 1.74.2.1 / (download) - annotate - [select for diffs], Tue Oct 19 17:47:43 1999 UTC (15 years ago) by thorpej
Branch: thorpej_scsipi
Changes since 1.74: +10 -10 lines
Diff to previous 1.74 (colored)

Adapt to scsipi API changes.

Revision 1.74 / (download) - annotate - [select for diffs], Thu Sep 23 11:04:32 1999 UTC (15 years, 1 month ago) by enami
Branch: MAIN
Branch point for: wrstuden-devbsize, thorpej_scsipi, fvdl-softdep
Changes since 1.73: +124 -8 lines
Diff to previous 1.73 (colored)

Allow to detach wdc, atapibus, wd and cd.

Revision 1.73 / (download) - annotate - [select for diffs], Mon Aug 30 12:58:58 1999 UTC (15 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.72: +12 -2 lines
Diff to previous 1.72 (colored)

If we are using UDMA mode > 2 and get a DMA error, downgrade to UDMA mode 2
first: maybe we incorrectly guessed the cable type.

Revision 1.66.2.4 / (download) - annotate - [select for diffs], Sat Aug 28 21:54:29 1999 UTC (15 years, 1 month ago) by he
Branch: netbsd-1-4
Changes since 1.66.2.3: +4 -2 lines
Diff to previous 1.66.2.3 (colored) to branchpoint 1.66 (colored)

Pull up revision 1.69:
  A mostly-stylistic change guarding tsleep() with a while() loop.  (bouyer)

Revision 1.72 / (download) - annotate - [select for diffs], Wed Aug 25 17:08:20 1999 UTC (15 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.71: +5 -2 lines
Diff to previous 1.71 (colored)

Guard pool_get()/pool_put() with splbio()/splx(). Fix kern/8245.

Revision 1.66.2.3 / (download) - annotate - [select for diffs], Wed Aug 25 11:18:38 1999 UTC (15 years, 2 months ago) by he
Branch: netbsd-1-4
Changes since 1.66.2.2: +33 -2 lines
Diff to previous 1.66.2.2 (colored) to branchpoint 1.66 (colored)

Pull up 1.69->1.70:
  Add some debug printfs, change timeout handling to be more efficient
  and less error-prone, and fix the "lockup after lost interrupt"
  problem some users have been reporting.  (bouyer)

Revision 1.71 / (download) - annotate - [select for diffs], Mon Aug 9 09:55:18 1999 UTC (15 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.70: +21 -44 lines
Diff to previous 1.70 (colored)

- use pool(9) for wdc_xfer, instead of managing a free list.
- fix printing of Ultra-DMA modes (shows up when the drive supports highther
  modes than the controller).
- Don't use C_NEEDDONE anymore. We were setting this flag in a possibly
  freed wdc_xfer (this didn't create problems, as it was free'd in the POLL
  case only, while IRQs are blocked, but it's not good practice anyway
  and pool(9) complains about it ;)

Revision 1.70 / (download) - annotate - [select for diffs], Fri Aug 6 12:00:25 1999 UTC (15 years, 2 months ago) by bouyer
Branch: MAIN
Changes since 1.69: +33 -2 lines
Diff to previous 1.69 (colored)

- Add some debug printf (WDCPROBE) in _wdcreset_wait(), I've needed these
  2 times in the past
- Set up timeout per xfer instead of per interrupt. This helps with
  PIO transfer (we would call timeout()/untimout() several times for a
  transfer).
- If we missed an interrupt for a PIO transfer, reset and restart it
  immedialy, don't try to recover and continue. If we missed an interrupt we
  may have lost a read/write cycle on the IDE bus. If this happens 1) we
  corrupt data and 2) we enter an interrupt loop at the end of the xfer, as
  the drive has some more data to read/write, but the host thinks the xfer is
  done.
This last change fix the (or at last some of the) 'lookup after lost interrupt'
some peoples have been experiencing.

Revision 1.66.2.1.2.3 / (download) - annotate - [select for diffs], Mon Aug 2 21:59:06 1999 UTC (15 years, 2 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.66.2.1.2.2: +4 -2 lines
Diff to previous 1.66.2.1.2.2 (colored) to branchpoint 1.66.2.1 (colored) next main 1.66.2.2 (colored)

Update from trunk.

Revision 1.69 / (download) - annotate - [select for diffs], Fri Jul 30 14:59:10 1999 UTC (15 years, 2 months ago) by bouyer
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.68: +4 -2 lines
Diff to previous 1.68 (colored)

Guard tsleep() with a while (!(wdc_c->flags & AT_DONE)) {}, as suggested by
Constantine Sapuntzakis confirmed by Bill Sommerfeld. Although nothing is
supposed to call wakeup on this without setting AT_DONE, it's good practice to
do it this way (the process may be waken up by a setrunnable() call).

Revision 1.66.2.1.2.2 / (download) - annotate - [select for diffs], Thu Jul 1 23:32:31 1999 UTC (15 years, 3 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.66.2.1.2.1: +23 -2 lines
Diff to previous 1.66.2.1.2.1 (colored) to branchpoint 1.66.2.1 (colored)

Sync w/ -current.

Revision 1.66.2.2 / (download) - annotate - [select for diffs], Thu Jun 24 00:06:01 1999 UTC (15 years, 4 months ago) by perry
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH001
Changes since 1.66.2.1: +23 -2 lines
Diff to previous 1.66.2.1 (colored) to branchpoint 1.66 (colored)

pullup 1.67->1.68 (bouyer)

Revision 1.68 / (download) - annotate - [select for diffs], Wed Jun 23 19:00:17 1999 UTC (15 years, 4 months ago) by bouyer
Branch: MAIN
Changes since 1.67: +23 -2 lines
Diff to previous 1.67 (colored)

Resurect the old register read/write test for non-ATA/ATAPI drives, to avoid
false matches on controllers which properly respond to a WDCC_RECAL command.
Should close PR port-i386/7702 (the author tested this patch, and said it
solves his problem).

Revision 1.66.2.1.2.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:17:57 1999 UTC (15 years, 4 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.66.2.1: +0 -0 lines
Diff to previous 1.66.2.1 (colored)

Sync w/ -current.

Revision 1.66.2.1 / (download) - annotate - [select for diffs], Mon Apr 12 09:14:30 1999 UTC (15 years, 6 months ago) by bouyer
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-RELEASE, kame_14_19990705, kame_14_19990628
Branch point for: kame, chs-ubc2
Changes since 1.66: +47 -58 lines
Diff to previous 1.66 (colored)

Sync with ic/wdc.c 1.67, ic/wdcvar.h 1.17, isa/wdc_isa.c 1.14:
Revert to a more conservative probe: it controller responded and we don't find
ATAPI signature, assume it and ATA or OLD drive (OLD is only set if the
wdc front end passed WDC_CAPABILITIES_OLD, only used for ISA front-end).
At attach time, issue an IDENTIFY to detect drives and eliminates ghosts.
If IDENTIFY failed and OLD is set, issue a RECAL to check for the presence
of old drives.
Should fix the 'disk dissapeared' problems reported by some users, including
port-arm32/7324.

Revision 1.67 / (download) - annotate - [select for diffs], Sun Apr 11 20:50:28 1999 UTC (15 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.66: +47 -58 lines
Diff to previous 1.66 (colored)

Fix probe code for IDE devices:
- Don't rely on ATA signature: some ide controllers seems to not transmit it
  properly (SIMIDE on arm32 machines). Instead, when we guess a drive is here
  after reset, just mark it as ATA and OLD is it's not ATAPI.
- at attach time, use IDENTIFY to eliminate ghost from the probe. If the
  drive had the old flag and IDENTIFY failed, issue a WDCC_RECAL command
  to detect a pre-ATA disk. If IDENTIFY succeded, remove the OLD flag,
  it's obviously not a pre-ATA disk.
- add a new controller flag, WDC_CAPABILITY_PREATA, used to shorcut parts
  of the probe (not necessary, but makes the probe/attach faster). This is
  only set by the ISA front-end, all other controllers supported can't have
  pre-ATA drives attached.
The mechanism used are more or less the same as before, they have just been
reordered. Should solve port-arm32/7324 (waiting for feedback).

Revision 1.66 / (download) - annotate - [select for diffs], Thu Apr 1 21:46:29 1999 UTC (15 years, 6 months ago) by bouyer
Branch: MAIN
CVS Tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Changes since 1.65: +9 -37 lines
Diff to previous 1.65 (colored)

- change the interrupt routines to take a 3rd arguments, set to 1 if we
  are called from the interrupt or timeout handler, 0 otherwise.
- use this to know if we can busy-wait for wait_for_unbusy or wait_for_ready
This fixes a bug where CDs withot the DRQ_INTR capability would not busy-wait
for the CMDOUT phase.
While I'm there change 2 delay() to DELAY() for consistency, and
garbage-collect some old code from wdcintr() which has been ifdef'd out
for some time now.

Revision 1.65 / (download) - annotate - [select for diffs], Wed Mar 31 11:18:31 1999 UTC (15 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.64: +17 -12 lines
Diff to previous 1.64 (colored)

Increase some DELAY(), this seems required on some hardware (I'm not sure if
the hardware is at fault, or if DELAY(1) waits for less than 1us).
Improve debuging messages for wdcreset_wait().

Revision 1.64 / (download) - annotate - [select for diffs], Mon Mar 29 08:32:02 1999 UTC (15 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.63: +3 -13 lines
Diff to previous 1.63 (colored)

Remove the hack to attach devices responding with ATA signatures as atapi if
IDENTIFY said so: it doesn't help for the drive this was supposed helping,
and seems to break another device.
In interrupt routine, don't return 0 if we are polling: this should fix the
"panic: wdc_exec_command: polled command not done" some people reported
(kern/7269).

Revision 1.63 / (download) - annotate - [select for diffs], Thu Mar 25 16:17:36 1999 UTC (15 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.62: +6 -7 lines
Diff to previous 1.62 (colored)

Avoid busy-waiting when possible if we are not polling (real IRQ or timeout
callback). Shared PCI IRQ should now work (but still untested).

Revision 1.62 / (download) - annotate - [select for diffs], Wed Mar 10 13:11:43 1999 UTC (15 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.61: +50 -18 lines
Diff to previous 1.61 (colored)

Add a new disk flag: DRIVE_OLD for pre-ATA disks. probe routine will now set
DRIVE_OLD, DRIVE_ATA or DRIVE_ATAPI based on register signatures.
The attach routine will issue a IDENTIFY command for ATA/ATAPI disk,
to detect flase matches by the probe routine.
probe/attach should now be fully compliant with ata-4/ata-5. As a side
effect, ATAPI drives which improperly use ATA register signatures should now
be attached as ATAPI.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Mar 7 14:02:54 1999 UTC (15 years, 7 months ago) by bouyer
Branch: MAIN
Changes since 1.60: +12 -4 lines
Diff to previous 1.60 (colored)

Keep track of CRC errors in Ultra-DMA mode. If we noticed a CRC error and we
need to downgrade, downgrade to PIO, as it has been shown if we got CRC errors
in Ultra-DMA mode, we will have silent data corruption in multiword DMA mode
(isn't IDE wonderfull ? :).
Set timeout to 1s for "normal" ata I/O, to minimise the effects of missed
interrupts.

Revision 1.60 / (download) - annotate - [select for diffs], Sun Feb 21 02:07:52 1999 UTC (15 years, 8 months ago) by abs
Branch: MAIN
Changes since 1.59: +4 -3 lines
Diff to previous 1.59 (colored)

wdcwait is called initially without any device on my thinkpad.
This breaks the first WDCDEBUG_PRINT. Handle this case.

Revision 1.59 / (download) - annotate - [select for diffs], Sat Feb 20 23:47:52 1999 UTC (15 years, 8 months ago) by hubertf
Branch: MAIN
Changes since 1.58: +3 -1 lines
Diff to previous 1.58 (colored)

Only #define WDCDEBUG if it isn't already defined (e.g. by some options
in the kernel config file).

Revision 1.58 / (download) - annotate - [select for diffs], Thu Feb 18 14:45:31 1999 UTC (15 years, 8 months ago) by bouyer
Branch: MAIN
Changes since 1.57: +3 -2 lines
Diff to previous 1.57 (colored)

Don't print an extra newline if the controller doesn't support 32 bits access.
Pointed out by Dave Huang.

Revision 1.57 / (download) - annotate - [select for diffs], Mon Feb 15 18:47:59 1999 UTC (15 years, 8 months ago) by bouyer
Branch: MAIN
Changes since 1.56: +7 -2 lines
Diff to previous 1.56 (colored)

Be less strict on ATAPI signature, at last one CD puts 0x00 in sc instead
of 0x01.

Revision 1.56 / (download) - annotate - [select for diffs], Mon Feb 8 15:22:28 1999 UTC (15 years, 8 months ago) by bouyer
Branch: MAIN
CVS Tags: bouyer-ide-last-dist
Changes since 1.55: +4 -4 lines
Diff to previous 1.55 (colored)

There's no ATA draft where it is required for the drive to set DRDY | DSC when
the disk is ready to transfer data, and in ATA-5 the DSC has been obsoleted.
So only wait for DRQ to transfer data. This can be made conditional on the
ATA version if it's proven to break with some drives (worked with all the
drives I have access to).
While I'm there correct a few typos.

Revision 1.55 / (download) - annotate - [select for diffs], Mon Jan 18 20:06:25 1999 UTC (15 years, 9 months ago) by bouyer
Branch: MAIN
Changes since 1.54: +27 -2 lines
Diff to previous 1.54 (colored)

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.54 / (download) - annotate - [select for diffs], Wed Dec 16 13:02:03 1998 UTC (15 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.53: +44 -1 lines
Diff to previous 1.53 (colored)

Keep track of DMA errors, and downgrade the transert mode (UDMA ->DMA,
DMA->PIO) in case of 2 consecutive errors. Don't downgrade if the
PIO/DMA/UDMA modes were forced by a config flag.

Revision 1.53 / (download) - annotate - [select for diffs], Tue Dec 8 13:29:31 1998 UTC (15 years, 10 months ago) by bouyer
Branch: MAIN
CVS Tags: kenh-if-detach-base, kenh-if-detach
Changes since 1.52: +2 -1 lines
Diff to previous 1.52 (colored)

Add a missing 'return' in an error path; noticed by Matthias Drochner.

Revision 1.52 / (download) - annotate - [select for diffs], Thu Dec 3 18:24:30 1998 UTC (15 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.51: +4 -4 lines
Diff to previous 1.51 (colored)

Rename pio_mode, etc ...  to PIO_cap, etc ... for consistency with the
ata_drive_datas struct. Suggested by Soren S. Jorvan.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Dec 3 17:30:32 1998 UTC (15 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)

UDMA->Ultra-DMA in a printf

Revision 1.50 / (download) - annotate - [select for diffs], Thu Dec 3 15:38:59 1998 UTC (15 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.49: +4 -6 lines
Diff to previous 1.49 (colored)

add a udma_mode field to wdc_softc, and use it the same way dma_mode is used
(higthest ultra-dma mode supported). There may be a higther ultra-dma mode
defined ...

Revision 1.49 / (download) - annotate - [select for diffs], Wed Dec 2 15:53:34 1998 UTC (15 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.48: +6 -7 lines
Diff to previous 1.48 (colored)

In struct wdc_xfer, change 'channel' to a pointer to a channel_softc, to avoid
a double-pointer dereference at run-time. Suggested by Matthias Drochner.

Revision 1.48 / (download) - annotate - [select for diffs], Wed Dec 2 10:52:25 1998 UTC (15 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.47: +35 -1 lines
Diff to previous 1.47 (colored)

- change drive_flags from u_int8_t to u_int16_t
- keep the modes supported by the drive in struct ata_drive_datas (will be
  later used for downgrading the DMA/PIO mode on error)
- use config flags to force/disable PIO/DMA/UDMA modes
- For the CMD PCI0643/6 setup DMA mode to DMA Read multiple.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Nov 29 17:34:49 1998 UTC (15 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.46: +6 -1 lines
Diff to previous 1.46 (colored)

wdcstart(): Re-add support of shared xfer queue across multiple channels
(was lost between 1.44 and 1.45).

Revision 1.46 / (download) - annotate - [select for diffs], Mon Nov 23 23:02:11 1998 UTC (15 years, 11 months ago) by kenh
Branch: MAIN
Changes since 1.45: +18 -1 lines
Diff to previous 1.45 (colored)

Implement the AT_READREG flag.  This is needed for the CHECK POWER MODE
ATA command (among others).

Revision 1.45 / (download) - annotate - [select for diffs], Sat Nov 21 15:41:41 1998 UTC (15 years, 11 months ago) by drochner
Branch: MAIN
Changes since 1.44: +9 -12 lines
Diff to previous 1.44 (colored)

in wdc_softc: access the per-channel data via a pointer array instead of
an array of fixed-sized channel_softc elements. This way IDE controllers
which more than 1 channel (pciide) can extend the channel data easily
for private needs.
To avoid the double dereference at runtime, change the argument of
wdcstart() to the channel data pointer instead of the array index.

Revision 1.44 / (download) - annotate - [select for diffs], Fri Nov 20 01:22:37 1998 UTC (15 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.43: +48 -4 lines
Diff to previous 1.43 (colored)

Implement reference counting for ATA adapters.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Nov 19 22:50:21 1998 UTC (15 years, 11 months ago) by kenh
Branch: MAIN
Changes since 1.42: +23 -20 lines
Diff to previous 1.42 (colored)

Sigh, my bad.  Check for chp->wdc being NULL before trying to deference it.
(I didn't realize the ISA wdc front-end doesn't fill in chp->wdc).

Revision 1.42 / (download) - annotate - [select for diffs], Thu Nov 19 19:52:42 1998 UTC (15 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.41: +21 -22 lines
Diff to previous 1.41 (colored)

Back out revision 1.40.  That change couldn't have POSSIBLY worked, since
when wdcprobe() is called, the wdc_softc pointer in the channel_softc
hasn't even been intialized!

Revision 1.41 / (download) - annotate - [select for diffs], Thu Nov 19 04:07:54 1998 UTC (15 years, 11 months ago) by kenh
Branch: MAIN
Changes since 1.40: +2 -1 lines
Diff to previous 1.40 (colored)

__wdccommand_done() needs to call wdcstart(), otherwise you can run
into deadlocks when using wdc_exec_command().

Revision 1.40 / (download) - annotate - [select for diffs], Wed Nov 18 19:12:08 1998 UTC (15 years, 11 months ago) by kenh
Branch: MAIN
Changes since 1.39: +22 -21 lines
Diff to previous 1.39 (colored)

Quirk out the first test in the beginning of wdcprobe(); the Vaio
CD-ROM drive doesn't like it for some reason.

Revision 1.39 / (download) - annotate - [select for diffs], Wed Nov 11 19:38:27 1998 UTC (15 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.38: +10 -8 lines
Diff to previous 1.38 (colored)

- 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.38 / (download) - annotate - [select for diffs], Wed Oct 21 09:12:46 1998 UTC (16 years ago) by bouyer
Branch: MAIN
CVS Tags: chs-ubc-base, chs-ubc
Changes since 1.37: +14 -1 lines
Diff to previous 1.37 (colored)

If WDC_DIAGNOSTIC is defined, check in wdcstart() that we are called at
splbio.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Oct 20 17:00:26 1998 UTC (16 years ago) by bouyer
Branch: MAIN
Changes since 1.36: +5 -1 lines
Diff to previous 1.36 (colored)

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().

Revision 1.36 / (download) - annotate - [select for diffs], Thu Oct 15 11:38:04 1998 UTC (16 years ago) by bouyer
Branch: MAIN
Changes since 1.35: +1 -2 lines
Diff to previous 1.35 (colored)

Kill an extra printf("\n").

Revision 1.35 / (download) - annotate - [select for diffs], Tue Oct 13 15:18:47 1998 UTC (16 years ago) by bouyer
Branch: MAIN
Changes since 1.34: +2 -1 lines
Diff to previous 1.34 (colored)

Add a new drive flag, DRIVE_MODE, set when the drive properly reported its
PIO/DMA modes. Don't try a SET_FEATURE if it didn't report its mode.

Revision 1.34 / (download) - annotate - [select for diffs], Tue Oct 13 15:02:42 1998 UTC (16 years ago) by bouyer
Branch: MAIN
Changes since 1.33: +17 -9 lines
Diff to previous 1.33 (colored)

In debug message, always print controller:channel:drive

Revision 1.33 / (download) - annotate - [select for diffs], Tue Oct 13 09:34:01 1998 UTC (16 years ago) by bouyer
Branch: MAIN
Changes since 1.32: +6 -3 lines
Diff to previous 1.32 (colored)

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.32 / (download) - annotate - [select for diffs], Tue Oct 13 08:59:45 1998 UTC (16 years ago) by bouyer
Branch: MAIN
Changes since 1.31: +13 -2 lines
Diff to previous 1.31 (colored)

pciide.c: don't define WDCDEBUG, so it compiles on alpha. Correct a bogon
in the printing of DMA mode (piix3/4 only)
others: set the debug_mask to 0, so that debug messages are turned off by
default but can be easily turned on.
Reset drive_flags to 0 for unconfigured devices, so that they are ignored
later. For configured devices, reset state to 0 after probe/attach.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Oct 12 16:09:18 1998 UTC (16 years ago) by bouyer
Branch: MAIN
Changes since 1.30: +861 -1712 lines
Diff to previous 1.30 (colored)

Merge bouyer-ide

Revision 1.24.2.19 / (download) - annotate - [select for diffs], Mon Oct 12 14:33:37 1998 UTC (16 years ago) by bouyer
Branch: bouyer-ide
CVS Tags: bouyer-ide-merge
Changes since 1.24.2.18: +3 -2 lines
Diff to previous 1.24.2.18 (colored) next main 1.25 (colored)

Sync with HEAD.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Oct 10 00:28:34 1998 UTC (16 years ago) by thorpej
Branch: MAIN
CVS Tags: bouyer-ide-base
Changes since 1.29: +2 -3 lines
Diff to previous 1.29 (colored)

Garbage-collect the open_target_lu and close_target_lu entry points from
struct scsipi_adapter; they were not used.

Add a scsipi_ioctl entry point to struct scsipi_adapter.  This will be
used to issue ioctl commands to the host adapters.

Inspired by PR #6090, from Matt Jacob.

Revision 1.24.2.18 / (download) - annotate - [select for diffs], Mon Oct 5 08:17:34 1998 UTC (16 years ago) by bouyer
Branch: bouyer-ide
Changes since 1.24.2.17: +11 -8 lines
Diff to previous 1.24.2.17 (colored)

Rename WDC_CAPABILITY_PIO to WDC_CAPABILITY_MODE, as it's used to tell wether
the controller's driver can tell which timing mode it uses. Check this
before setting DMA modes too.
This allow the generic DMA code to work again.

Revision 1.24.2.17 / (download) - annotate - [select for diffs], Sun Oct 4 15:01:55 1998 UTC (16 years ago) by bouyer
Branch: bouyer-ide
Changes since 1.24.2.16: +21 -11 lines
Diff to previous 1.24.2.16 (colored)

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.24.2.16 / (download) - annotate - [select for diffs], Fri Oct 2 19:37:20 1998 UTC (16 years ago) by bouyer
Branch: bouyer-ide
Changes since 1.24.2.15: +20 -40 lines
Diff to previous 1.24.2.15 (colored)

Cleanup a few error message, remove some dead code. Re-add a reset at end of
attach, unless we have WDC_NO_EXTRA_RESETS.
Add support for data32iot/data32ioh from -current: each controller pass
WDC_CAPABILITY_DATA32 if they can do 32bit, and WDC_CAPABILITY_DATA16 if they
can do 16bit. For controller that support both, the usual autodetect
mechanism is still used.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Sep 22 00:27:51 1998 UTC (16 years, 1 month ago) by mark
Branch: MAIN
Changes since 1.28: +72 -25 lines
Diff to previous 1.28 (colored)

Use the data32iot and data32ioh members of the wdc_attachment_data
structure for 32 bit transfers.
Test for 32 bit capability on data transfers currently restricted to 16 bit
only.

Revision 1.24.2.15 / (download) - annotate - [select for diffs], Mon Sep 21 17:30:17 1998 UTC (16 years, 1 month ago) by bouyer
Branch: bouyer-ide
Changes since 1.24.2.14: +12 -4 lines
Diff to previous 1.24.2.14 (colored)

Check ATAPI signature for all drives on a channel, before atempting the
register write test. The test on the first ATA drive will clobber the register
of the slave ATAPI.

Revision 1.24.2.14 / (download) - annotate - [select for diffs], Sun Sep 20 19:00:15 1998 UTC (16 years, 1 month ago) by bouyer
Branch: bouyer-ide
Changes since 1.24.2.13: +15 -24 lines
Diff to previous 1.24.2.13 (colored)

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.24.2.13 / (download) - annotate - [select for diffs], Sun Sep 20 13:16:16 1998 UTC (16 years, 1 month ago) by bouyer
Branch: bouyer-ide
Changes since 1.24.2.12: +171 -174 lines
Diff to previous 1.24.2.12 (colored)

- 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.24.2.12 / (download) - annotate - [select for diffs], Fri Sep 11 16:23:12 1998 UTC (16 years, 1 month ago) by bouyer
Branch: bouyer-ide
Changes since 1.24.2.11: +15 -12 lines
Diff to previous 1.24.2.11 (colored)

Sync with HEAD.

Revision 1.28 / (download) - annotate - [select for diffs], Thu Sep 10 19:24:45 1998 UTC (16 years, 1 month ago) by kenh
Branch: MAIN
Changes since 1.27: +5 -3 lines
Diff to previous 1.27 (colored)

Add support for passing device quirks from the attachment routine,
and add support for a NO_EXTRA_RESETS quirk (required by the TEAC
IDE Card/II, which the Vaio uses).

Revision 1.24.2.11 / (download) - annotate - [select for diffs], Fri Aug 21 16:34:46 1998 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-ide
Changes since 1.24.2.10: +22 -20 lines
Diff to previous 1.24.2.10 (colored)

Sync with -current

Revision 1.27 / (download) - annotate - [select for diffs], Sat Aug 15 10:10:50 1998 UTC (16 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.26: +22 -22 lines
Diff to previous 1.26 (colored)

Assign my copyrights to TNF.

Revision 1.26 / (download) - annotate - [select for diffs], Fri Aug 14 20:39:04 1998 UTC (16 years, 2 months ago) by drochner
Branch: MAIN
Changes since 1.25: +3 -1 lines
Diff to previous 1.25 (colored)

explicitely select the master before trying to access its registers

Revision 1.24.2.10 / (download) - annotate - [select for diffs], Thu Aug 13 14:27:50 1998 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-ide
Changes since 1.24.2.9: +79 -35 lines
Diff to previous 1.24.2.9 (colored)

 - 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.25 / (download) - annotate - [select for diffs], Tue Jun 30 00:08:32 1998 UTC (16 years, 3 months ago) by hpeyerl
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

Fix spalling misteak: indentify -> identify

Revision 1.24.2.9 / (download) - annotate - [select for diffs], Fri Jun 19 21:57:44 1998 UTC (16 years, 4 months ago) by leo
Branch: bouyer-ide
Changes since 1.24.2.8: +4 -5 lines
Diff to previous 1.24.2.8 (colored)

Fix hw-locking.

Revision 1.24.2.8 / (download) - annotate - [select for diffs], Wed Jun 10 11:19:19 1998 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-ide
Changes since 1.24.2.7: +4 -4 lines
Diff to previous 1.24.2.7 (colored)

Fix probe/attach for ATAPI or ATA-only kernels.
(XXX still 'brocken' in one way, will be worked out soon).

Revision 1.24.2.7 / (download) - annotate - [select for diffs], Tue Jun 9 13:58:17 1998 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-ide
Changes since 1.24.2.6: +4 -4 lines
Diff to previous 1.24.2.6 (colored)

Fix typos (from Soren S. Jorvan).

Revision 1.24.2.6 / (download) - annotate - [select for diffs], Tue Jun 9 13:01:27 1998 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-ide
Changes since 1.24.2.5: +21 -13 lines
Diff to previous 1.24.2.5 (colored)

- sync with trunck
- add a missing '~' when resetting the 32BIT flag to 0.
- don't try to set the PIO or DMA mode if we don't know how to set them
  on the controller. This seems to confuse some 'intelligent' isa controllers.

Revision 1.24.2.5 / (download) - annotate - [select for diffs], Fri Jun 5 16:15:27 1998 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-ide
Changes since 1.24.2.4: +2 -2 lines
Diff to previous 1.24.2.4 (colored)

Add a missing LIST_INIT().

Revision 1.24.2.4 / (download) - annotate - [select for diffs], Fri Jun 5 10:09:14 1998 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-ide
Changes since 1.24.2.3: +17 -6 lines
Diff to previous 1.24.2.3 (colored)

A few bux fixes (untested):
 - If the PIO mode of the controller is unknown, put the drive in the
   hightest mode it supports. A drive in a faster mode than the controller
   should work.
 - Create DMA maps even for unknown controllers in pciide.

Revision 1.24.2.3 / (download) - annotate - [select for diffs], Fri Jun 5 08:38:57 1998 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-ide
Changes since 1.24.2.2: +561 -531 lines
Diff to previous 1.24.2.2 (colored)

Patches from Leo Weppelman for IDE on atari, with minor fixes by me
(needed the addition of a void wdcrestart __P((void*)) function).
Quoting his words:
These diffs are preliminary because it looks like the free_hw() function
does not get called. This is only a problem on the atari falcon. I have not
yet been able to track this down.
Also, KNF wdc.c.

Revision 1.24.2.2 / (download) - annotate - [select for diffs], Thu Jun 4 16:52:47 1998 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-ide
Changes since 1.24.2.1: +1039 -0 lines
Diff to previous 1.24.2.1 (colored)

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.24.2.1, Thu Jun 4 02:27:33 1998 UTC (16 years, 4 months ago) by bouyer
Branch: bouyer-ide
Changes since 1.24: +0 -1927 lines
FILE REMOVED

file wdc.c was added on branch bouyer-ide on 1998-06-04 16:52:47 +0000

Revision 1.24 / (download) - annotate - [select for diffs], Thu Jun 4 02:27:33 1998 UTC (16 years, 4 months ago) by enami
Branch: MAIN
Branch point for: bouyer-ide
Changes since 1.23: +5 -3 lines
Diff to previous 1.23 (colored)

Make this compile with WDDEBUG

Revision 1.23 / (download) - annotate - [select for diffs], Tue Apr 28 18:36:07 1998 UTC (16 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.22: +7 -1 lines
Diff to previous 1.22 (colored)

In wdcintr(), add a catch-all case so that this will compile if no
children are configured.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Apr 26 06:03:24 1998 UTC (16 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Update copyright.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Apr 26 05:28:24 1998 UTC (16 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.20: +7 -6 lines
Diff to previous 1.20 (colored)

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.20 / (download) - annotate - [select for diffs], Thu Apr 23 13:30:40 1998 UTC (16 years, 6 months ago) by bouyer
Branch: MAIN
Changes since 1.19: +1 -6 lines
Diff to previous 1.19 (colored)

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.19 / (download) - annotate - [select for diffs], Tue Apr 7 19:51:57 1998 UTC (16 years, 6 months ago) by leo
Branch: MAIN
Changes since 1.18: +17 -0 lines
Diff to previous 1.18 (colored)

Add hooks to make exclusive hardware locking possible. This is necessary
to make the driver suitable for the atari falcon.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Mar 27 19:32:15 1998 UTC (16 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.17: +4 -1 lines
Diff to previous 1.17 (colored)

add a short delay (5ms) after ATAPI software reset is done, suggested by
Soren S. Jorvang <soren@t.dk>.  Apparently some devices Really Want this.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Feb 4 14:13:42 1998 UTC (16 years, 8 months ago) by sakamoto
Branch: MAIN
Changes since 1.16: +3 -3 lines
Diff to previous 1.16 (colored)

Change "__BUS_SPACE_NEED_STREAM_METHODS" to "__BUS_SPACE_HAS_STREAM_METHODS".

Revision 1.16 / (download) - annotate - [select for diffs], Tue Feb 3 04:26:46 1998 UTC (16 years, 8 months ago) by sakamoto
Branch: MAIN
Changes since 1.15: +12 -5 lines
Diff to previous 1.15 (colored)

Change the data access busification functions to
the "stream" busification functions.
In the architecture as the BeBox(CPU is big endian, have ISA bus),
These methods would be used where "raw" data needs to {read,write,set}
unchanged.

Add #ifndef __BUS_SPACE_NEED_STREAM_METHODS (define that on NetBSD/bebox),
if not define __BUS_SPACE_NEED_STREAM_METHODS,
define "stream" busification functions to normal busification functions.

Revision 1.15 / (download) - annotate - [select for diffs], Fri Jan 23 01:06:45 1998 UTC (16 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored)

Assume a newline has already been printed in wdcattach().

Revision 1.14 / (download) - annotate - [select for diffs], Thu Jan 15 02:23:43 1998 UTC (16 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.13: +1 -3 lines
Diff to previous 1.13 (colored)

#include a just-added scsipi header.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Jan 15 01:26:16 1998 UTC (16 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.12: +1 -9 lines
Diff to previous 1.12 (colored)

kill a couple of unnecessary #ifs

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jan 14 23:42:02 1998 UTC (16 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.11: +243 -185 lines
Diff to previous 1.11 (colored)

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.11 / (download) - annotate - [select for diffs], Mon Jan 12 09:43:50 1998 UTC (16 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.10: +1 -5 lines
Diff to previous 1.10 (colored)

Update for config changes.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jan 7 08:47:54 1998 UTC (16 years, 9 months ago) by mikel
Branch: MAIN
Changes since 1.9: +8 -8 lines
Diff to previous 1.9 (colored)

fix some typos in error messages & comments

Revision 1.6.2.3 / (download) - annotate - [select for diffs], Wed Dec 24 06:03:24 1997 UTC (16 years, 10 months ago) by perry
Changes since 1.6.2.2: +2 -1 lines
Diff to previous 1.6.2.2 (colored) next main 1.7 (colored)

pull up emergency patch from trunk (fvdl)

Revision 1.9 / (download) - annotate - [select for diffs], Wed Dec 24 02:01:00 1997 UTC (16 years, 10 months ago) by fvdl
Branch: MAIN
Changes since 1.8: +2 -1 lines
Diff to previous 1.8 (colored)

Add extra delay after wdcreset() call in wdcprobe. Needed by at least
one controller, where registers otherwise will still be inaccesible
(even though the busy bit has been reset), making the probe fail.

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Thu Nov 6 22:18:32 1997 UTC (16 years, 11 months ago) by mellon
Changes since 1.6.2.1: +32 -30 lines
Diff to previous 1.6.2.1 (colored)

Pull rev 1.8 up from trunk (bouyer)

Revision 1.8 / (download) - annotate - [select for diffs], Wed Nov 5 22:19:07 1997 UTC (16 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.7: +32 -30 lines
Diff to previous 1.7 (colored)

Various bug fixes for atapi part:
- clean up debug code
- Don't check ATAPI signature when probing ATA drives, ATAPI devices were
  detected before
- Reset controller after disks probes. The probe, with some combinations of
  ATA/ATAPI device keep it in a mostly working, but strange state (with busy
  led on)
- The WDCF_IRQ_WAIT flag is now cleared by wdc_ata_intr and wdc_atapi_intr
  when appropriate (helps recover from failure conditions)
- In wdcunwedge, send ATAPI_SOFT_RESET to non-ata drives
  (helps recover from failure conditions)
- in wdctimeout be a bit more verbose when we missed an interrupt
- Always Increment xfer->c_skip where it should be
- Set the ITSDONE flag when a polled command completed.

Revision 1.6.2.1 / (download) - annotate - [select for diffs], Mon Oct 27 20:02:03 1997 UTC (16 years, 11 months ago) by mellon
Changes since 1.6: +31 -28 lines
Diff to previous 1.6 (colored)

Pull rev 1.7 up from trunk (bouyer)

Revision 1.7 / (download) - annotate - [select for diffs], Mon Oct 27 14:09:23 1997 UTC (16 years, 11 months ago) by bouyer
Branch: MAIN
Changes since 1.6: +31 -28 lines
Diff to previous 1.6 (colored)

Changes to the probe and attach routine:
- at end of attach, explicitely select an existing drive. This fixes hangs
  some users reported (such as the one reported in port-i386/4247).
- Some atapi cdrom drives (e.g. Nec 24x) don't enables their registers before
  a controller reset is issued. The controller probe routine is changed as
  follow: issue a controller reset. If fail, test atapi signature on slave.
  If fail, wait 5s and retry a reset. If the second reset fail, return(0).
  If the first reset succeed, test presence of a master drive:
  atapi signature, and if this fail RO/RW registers test. If no master, test
  atapi signature on slave. If no slave, return 0.

Revision 1.6 / (download) - annotate - [select for diffs], Thu Oct 16 15:16:34 1997 UTC (17 years ago) by matt
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

Fix a misspelling of slave in a comment.

Revision 1.2.2.4 / (download) - annotate - [select for diffs], Mon Sep 29 07:20:50 1997 UTC (17 years ago) by thorpej
Changes since 1.2.2.3: +11 -12 lines
Diff to previous 1.2.2.3 (colored) next main 1.3 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Sep 24 17:00:55 1997 UTC (17 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.4: +11 -12 lines
Diff to previous 1.4 (colored)

Return the rigth value in the interrupt handler. This change the semantic
of wdc_atapi_intr, so we check for ITSDONE rather than the return value for
a pooled command.

Revision 1.2.2.3 / (download) - annotate - [select for diffs], Thu Sep 4 01:05:46 1997 UTC (17 years, 1 month ago) by thorpej
Changes since 1.2.2.2: +10 -3 lines
Diff to previous 1.2.2.2 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Sep 3 07:57:51 1997 UTC (17 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.3: +10 -3 lines
Diff to previous 1.3 (colored)

Add a map to wdc_softc to track the already known devices to prevent them to
be probed several times. This fixes the "ATAPI CD probed as wd drive" problem.
Thanks to Geoff Wing <mason@primenet.com.au> for testing this on his hardware.

Revision 1.2.2.2 / (download) - annotate - [select for diffs], Mon Sep 1 20:26:49 1997 UTC (17 years, 1 month ago) by thorpej
Changes since 1.2.2.1: +2 -2 lines
Diff to previous 1.2.2.1 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Aug 28 11:05:01 1997 UTC (17 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

Change an ATAPI_DEBUG2->ATAPI_DEBUG. This debug message is needed when
looking what's the autoconfig do on strange harware, and ATAPI_DEBUG2 is
for debuging data transfers (and is really verbose once the machine has booted
from an IDE disk).

Revision 1.2.2.1 / (download) - annotate - [select for diffs], Wed Aug 27 23:32:12 1997 UTC (17 years, 1 month ago) by thorpej
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.2 / (download) - annotate - [select for diffs], Wed Aug 27 11:25:16 1997 UTC (17 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.1: +1840 -0 lines
Diff to previous 1.1 (colored)

Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Fri Jul 18 11:05:55 1997 UTC (17 years, 3 months ago) by bouyer
Changes since 1.1.2.1: +12 -13 lines
Diff to previous 1.1.2.1 (colored) next main 1.2 (colored)

Update from trunck:
fvdl: "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.1.2.1 / (download) - annotate - [select for diffs], Tue Jul 1 17:47:08 1997 UTC (17 years, 3 months ago) by bouyer
Changes since 1.1: +1841 -0 lines
Diff to previous 1.1 (colored)

Add the ide atapi driver from my original atapi driver, ported
to scsipi.

Revision 1.1, Tue Jul 1 17:47:07 1997 UTC (17 years, 3 months ago) by bouyer
Branch: MAIN
FILE REMOVED

file wdc.c was initially added on branch bouyer-scsipi.

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




CVSweb <webmaster@jp.NetBSD.org>