The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.310 / (download) - annotate - [select for diffs], Fri Mar 15 16:16:12 2013 UTC (2 months, 1 week ago) by martin
Branch: MAIN
CVS Tags: khorben-n900, agc-symver-base, agc-symver, HEAD
Changes since 1.309: +4 -3 lines
Diff to previous 1.309 (colored)

Prompted by PR kern/47646, zero the value buffer before running the
GET_CONFIGURATION command and check for an unexpectedly large feature
length answer afterwards.

Revision 1.309 / (download) - annotate - [select for diffs], Sun May 6 17:23:10 2012 UTC (12 months, 2 weeks ago) by martin
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, tls-maxphys-nbase, tls-maxphys-base, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Changes since 1.308: +20 -3 lines
Diff to previous 1.308 (colored)

When ejecting a medium, invalidate the in core disklabel - it is not
meaningfull anymore. This makes the following cdclose() use silent
mode and finally fixes PR kern/43785.

Revision 1.308 / (download) - annotate - [select for diffs], Sun May 6 16:42:19 2012 UTC (12 months, 2 weeks ago) by martin
Branch: MAIN
Changes since 1.307: +9 -10 lines
Diff to previous 1.307 (colored)

In cdopen: make the test for media presence always silent. In all cases
requiring a message, we will most likely get that from the spinup attempt
anyway.
This avoids the spurious "Check Condition on CDB, Not Ready, Medium Not
Present, Tray Closed" messages at boot/shutdown time.

Revision 1.307 / (download) - annotate - [select for diffs], Thu Apr 19 17:45:20 2012 UTC (13 months ago) by bouyer
Branch: MAIN
CVS Tags: jmcneill-usbmp-base9
Changes since 1.306: +5 -5 lines
Diff to previous 1.306 (colored)

Expand struct scsipi_bustype {} in a ABI-backward-compatible way to
pass more informations about the bus:
- bustype_type has 2 different bytes, one holding the existing
  SCSIPI_BUSTYPE_* (scsi, atapi, ata), and one for a per-SCSIPI_BUSTYPE_*
  subtype. Introduce macros to build or extract bustype_type.
- for SCSIPI_BUSTYPE_SCSI, define subtypes for parallel SCSI, Fibre Channel,
  SAS and USB, to specify the transport method. SCSIPI_BUSTYPE_SCSI_PSCSI
  is 0 so that bustype_type value doesn't change for existing code
- for non-SCSIPI_BUSTYPE_SCSI busses there's no defined subtype yet,
  so the bustype_type value doesn't change.
- provide scsi_fc_bustype, scsi_sas_bustype and scsi_usb_bustype
  along with scsi_bustype to be used by bus driver where appropriate
- scsipi_print_xfer_mode(): more existing code under a
  (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_PSCSI) case, as
  sync/wide parameters only make sense for parallel SCSI.
  For (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_FC) and
  (SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_SAS), only print
  tagged queing status if enabled. Just be silent for other
  bustypes.

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

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

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

Revision 1.306 / (download) - annotate - [select for diffs], Sat Feb 25 10:17:14 2012 UTC (14 months, 4 weeks ago) by shattered
Branch: MAIN
CVS Tags: yamt-pagecache-base4, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4
Changes since 1.305: +5 -5 lines
Diff to previous 1.305 (colored)

Fix typos in comments.

OK by wiz@

Revision 1.305 / (download) - annotate - [select for diffs], Thu Feb 2 19:43:06 2012 UTC (15 months, 3 weeks ago) by tls
Branch: MAIN
CVS Tags: netbsd-6-base, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Branch point for: netbsd-6
Changes since 1.304: +2 -12 lines
Diff to previous 1.304 (colored)

Entropy-pool implementation move and cleanup.

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

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

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

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

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

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

Revision 1.304 / (download) - annotate - [select for diffs], Fri Nov 25 12:39:55 2011 UTC (17 months, 4 weeks ago) by joerg
Branch: MAIN
CVS Tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Changes since 1.303: +4 -4 lines
Diff to previous 1.303 (colored)

Replace memset with incorrect size argument with M_ZERO.

Revision 1.303 / (download) - annotate - [select for diffs], Fri May 20 09:23:37 2011 UTC (2 years ago) by reinoud
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache
Changes since 1.302: +3 -3 lines
Diff to previous 1.302 (colored)

Fix size reporting for DVD+R/DL and BluRay's; the value was trunced due to a
32 bit trunc due to a lacking type cast. The number of sectors for such media
can be more than 1<<32-1.

Revision 1.302 / (download) - annotate - [select for diffs], Sun Apr 4 21:36:22 2010 UTC (3 years, 1 month ago) by martin
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, matt-mips64-premerge-20101231, jruoho-x86intr-base, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: jruoho-x86intr
Changes since 1.301: +20 -9 lines
Diff to previous 1.301 (colored)

cd_size: if we fake a size (and I realy have no idea why this would be a
good idea), at least set up all values to the fake values, as the caller
expects.
Should fix PR kern/39904, though if noone can find out why the fake value
would be needed, we should change it to just return 0 as suggested in the PR.

Revision 1.301 / (download) - annotate - [select for diffs], Tue Mar 23 18:56:18 2010 UTC (3 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.300: +8 -3 lines
Diff to previous 1.300 (colored)

If we find a device in non-2048 byte/block mode and manage to switch
it over, we need to adjust the capacity - so just read it again.

Revision 1.300 / (download) - annotate - [select for diffs], Tue Mar 23 12:42:55 2010 UTC (3 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.299: +10 -4 lines
Diff to previous 1.299 (colored)

Make cdclose() silent, if we only have the raw partition open (e.g. when
probing for media and not finding any)

Revision 1.299 / (download) - annotate - [select for diffs], Mon Mar 22 16:49:41 2010 UTC (3 years, 2 months ago) by martin
Branch: MAIN
Changes since 1.298: +12 -2 lines
Diff to previous 1.298 (colored)

Add a DIOCTUR (test unit ready) ioctl, to allow userland to easily
(and silently) check for presence of media. While this would be easy
to implement via SCIOCCOMMAND, our kernel has quirks for this
command, which otherwise would not be readily available to userland
applications.

Revision 1.298 / (download) - annotate - [select for diffs], Thu Mar 11 04:00:36 2010 UTC (3 years, 2 months ago) by mrg
Branch: MAIN
Branch point for: rmind-uvmplock
Changes since 1.297: +3 -2 lines
Diff to previous 1.297 (colored)

various aprint_* fixes.

Revision 1.297 / (download) - annotate - [select for diffs], Wed Jan 6 20:16:57 2010 UTC (3 years, 4 months ago) by martin
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9, uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.296: +4 -2 lines
Diff to previous 1.296 (colored)

Some usb devices come with an internal emulated umass CD drive (containing
windows drivers). I have such a device that has 0 features - avoid wrappig
features_len to a very big unsiged 32bit number in this case.

Revision 1.296 / (download) - annotate - [select for diffs], Sun Dec 6 22:48:17 2009 UTC (3 years, 5 months ago) by dyoung
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.295: +3 -23 lines
Diff to previous 1.295 (colored)

Delete do-nothing device-activation hooks.

Revision 1.295 / (download) - annotate - [select for diffs], Wed Oct 21 21:12:05 2009 UTC (3 years, 7 months ago) by rmind
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.294: +45 -57 lines
Diff to previous 1.294 (colored)

Remove uarea swap-out functionality:

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

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

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

Revision 1.294 / (download) - annotate - [select for diffs], Sun Jul 26 15:29:00 2009 UTC (3 years, 9 months ago) by reinoud
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7
Changes since 1.293: +3 -3 lines
Diff to previous 1.293 (colored)

Significantly bump time for SCSI track/disc closure. DVD-RW when used
sequentially can significantly take more time.

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

Add support for DIOCGDISKINFO to disk like device drivers. Change
partutil.c::getdiskinfo to use it to get disk geometry info.
Use DIOCGWEDGEINFO ioctl to get information about partition size, if disk
driver doesn't support it use old DIOCGDINFO. This patch adds support for
wedge like devices(lvm logical volumes, ZFS zvol partitions) to newfs and
other tools.

No objections on tech-userlevel@.

Revision 1.292 / (download) - annotate - [select for diffs], Tue Apr 7 18:35:17 2009 UTC (4 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jym-xensuspend-base
Changes since 1.291: +4 -10 lines
Diff to previous 1.291 (colored)

Detach atapibus(4), scsibus(4), cd(4), and sd(4) during shutdown.
Destroy sd->sc_callout in sddetach().  Delete some dead code in
cddetach().

Revision 1.291 / (download) - annotate - [select for diffs], Wed Apr 1 12:19:04 2009 UTC (4 years, 1 month ago) by reinoud
Branch: MAIN
Changes since 1.290: +29 -5 lines
Diff to previous 1.290 (colored)

Implement MMC_TRACKINFO_DATA and MMC_TRACKINFO_AUDIO detection for cdrom and
dvdrom devices. These two compatibility codes were forgotten when those were
introduced.

Revision 1.290 / (download) - annotate - [select for diffs], Wed Mar 18 16:00:20 2009 UTC (4 years, 2 months ago) by cegger
Branch: MAIN
Changes since 1.289: +6 -6 lines
Diff to previous 1.289 (colored)

bzero -> memset

Revision 1.289 / (download) - annotate - [select for diffs], Tue Mar 17 21:25:47 2009 UTC (4 years, 2 months ago) by reinoud
Branch: MAIN
Changes since 1.288: +7 -2 lines
Diff to previous 1.288 (colored)

Fix long standing problem with CD/DVD writing with `dd'. If done this way the
device will remain in a wait-for-more-stuff-to-be-written state delaying other
SCSI calls, esp. some read-size or read-layout calls, until its told there is
no more comming.

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

This fixes PR 40528

Revision 1.288 / (download) - annotate - [select for diffs], Sat Mar 14 11:08:29 2009 UTC (4 years, 2 months ago) by ad
Branch: MAIN
Changes since 1.287: +3 -3 lines
Diff to previous 1.287 (colored)

'boot -z' bogons

Revision 1.287 / (download) - annotate - [select for diffs], Wed Jan 21 17:16:12 2009 UTC (4 years, 4 months ago) by cegger
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Branch point for: jym-xensuspend
Changes since 1.286: +3 -3 lines
Diff to previous 1.286 (colored)

buildfix: re-adapt to major()/minor() returning a 32bit value.

Revision 1.286 / (download) - annotate - [select for diffs], Tue Jan 13 13:35:54 2009 UTC (4 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.285: +8 -8 lines
Diff to previous 1.285 (colored)

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

Revision 1.285 / (download) - annotate - [select for diffs], Sun Jan 11 10:05:53 2009 UTC (4 years, 4 months ago) by cegger
Branch: MAIN
Changes since 1.284: +3 -3 lines
Diff to previous 1.284 (colored)

make this compile

Revision 1.284 / (download) - annotate - [select for diffs], Tue Dec 30 19:38:36 2008 UTC (4 years, 4 months ago) by reinoud
Branch: MAIN
Changes since 1.283: +14 -7 lines
Diff to previous 1.283 (colored)

Add ISO partition detection enabling auto-detection of iso9660 and UDF
partitions on optical media like CD/DVD/BD but also on all other media if
there is no NetBSD disklabel or MBR label.

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

Revision 1.283 / (download) - annotate - [select for diffs], Fri Sep 5 22:25:39 2008 UTC (4 years, 8 months ago) by gmcgarry
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.282: +2 -4 lines
Diff to previous 1.282 (colored)

Remove unreachable code introduced by rev 1.224.  Fixes PR#38973.

Revision 1.282 / (download) - annotate - [select for diffs], Thu Jun 12 23:06:14 2008 UTC (4 years, 11 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base
Branch point for: haad-dm
Changes since 1.281: +3 -3 lines
Diff to previous 1.281 (colored)

use device_lookup_private to get softc

Revision 1.281 / (download) - annotate - [select for diffs], Mon May 12 21:39:56 2008 UTC (5 years ago) by jnemeth
Branch: MAIN
CVS Tags: yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, hpcarm-cleanup-nbase
Branch point for: simonb-wapbl
Changes since 1.280: +39 -2 lines
Diff to previous 1.280 (colored)

add support for drvctl properties

Revision 1.280 / (download) - annotate - [select for diffs], Mon May 12 09:41:02 2008 UTC (5 years ago) by tron
Branch: MAIN
Changes since 1.279: +16 -17 lines
Diff to previous 1.279 (colored)

Fix SSP kernel builds.

Revision 1.279 / (download) - annotate - [select for diffs], Thu May 8 12:57:19 2008 UTC (5 years ago) by reinoud
Branch: MAIN
Changes since 1.278: +334 -6 lines
Diff to previous 1.278 (colored)

Implement write support for the MMC framework. This consists of a setting
up of write parameters call and a call to perform a series of operations on
these devices.

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

Revision 1.278 / (download) - annotate - [select for diffs], Tue May 6 11:08:19 2008 UTC (5 years ago) by yamt
Branch: MAIN
Branch point for: wrstuden-revivesa
Changes since 1.277: +4 -4 lines
Diff to previous 1.277 (colored)

getiobuf(false, NULL) -> getiobuf(NULL, false)

Revision 1.277 / (download) - annotate - [select for diffs], Fri May 2 16:06:38 2008 UTC (5 years ago) by reinoud
Branch: MAIN
Changes since 1.276: +11 -2 lines
Diff to previous 1.276 (colored)

Extend the MMC framework to also create sensible reports on audio discs.

Revision 1.276 / (download) - annotate - [select for diffs], Fri May 2 15:53:10 2008 UTC (5 years ago) by reinoud
Branch: MAIN
Changes since 1.275: +27 -2 lines
Diff to previous 1.275 (colored)

Fixup CD and DVD drives that appear to be on crack when reporting features.
They state f.e. that a recordable CD-R is rewritable or completely forget
that the fixed packet size formatted CD-RW is strict overwrite rewritable
and not randomly rewritable.

Revision 1.275 / (download) - annotate - [select for diffs], Fri May 2 15:34:16 2008 UTC (5 years ago) by reinoud
Branch: MAIN
Changes since 1.274: +28 -7 lines
Diff to previous 1.274 (colored)

Make the SCSI sense code "Logical Unit Not Ready, Operation In Progress"
(Sense code 0x04, 0x07) not a fatal error anymore but retry command later.
This sense code can be returned on a CD-MRW write that encounters a bad
block resulting in the drive being busy relocating it. During that time it
can return this sense code to indicate its busy for a while.

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

Revision 1.274 / (download) - annotate - [select for diffs], Mon Apr 28 20:23:57 2008 UTC (5 years ago) by martin
Branch: MAIN
Changes since 1.273: +2 -9 lines
Diff to previous 1.273 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.273 / (download) - annotate - [select for diffs], Mon Mar 24 18:27:06 2008 UTC (5 years, 2 months ago) by cube
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.272: +31 -33 lines
Diff to previous 1.272 (colored)

Split device_t for cd(4).

Revision 1.272 / (download) - annotate - [select for diffs], Wed Jan 2 11:48:38 2008 UTC (5 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, matt-armv6-base, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Branch point for: mjf-devfs2
Changes since 1.271: +10 -14 lines
Diff to previous 1.271 (colored)

Merge vmlocking2 to head.

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

Merge jmcneill-pm branch.

Revision 1.270 / (download) - annotate - [select for diffs], Tue Nov 27 18:06:37 2007 UTC (5 years, 5 months ago) by reinoud
Branch: MAIN
CVS Tags: yamt-kmem-base, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base
Branch point for: yamt-kmem, vmlocking2
Changes since 1.269: +28 -11 lines
Diff to previous 1.269 (colored)

Pullup fixes from UDF write development project. This patch fixes a
conceptional bug in mmc_discinfo, improves DVD+R feature detection and
prevents corruption of mmc_trackinfo readout on some devices that return
short trackinfo structures.

Revision 1.269 / (download) - annotate - [select for diffs], Mon Oct 8 16:41:14 2007 UTC (5 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs
Changes since 1.268: +4 -4 lines
Diff to previous 1.268 (colored)

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

Revision 1.268 / (download) - annotate - [select for diffs], Sat Aug 4 02:58:59 2007 UTC (5 years, 9 months ago) by rumble
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5, matt-mips64-base
Branch point for: yamt-x86pmap, matt-mips64, matt-armv6
Changes since 1.267: +97 -68 lines
Diff to previous 1.267 (colored)

Be sure not to make requests over MAXPHYS when employing bounce buffers.
It was previously possible to round up one sector length if the start block
were not properly aligned.

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

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

No complaints on tech-kern.

Revision 1.267 / (download) - annotate - [select for diffs], Sun Jul 29 12:50:22 2007 UTC (5 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: hpcarm-cleanup
Branch point for: jmcneill-pm
Changes since 1.266: +8 -14 lines
Diff to previous 1.266 (colored)

It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.

Revision 1.266 / (download) - annotate - [select for diffs], Sat Jul 21 19:51:48 2007 UTC (5 years, 10 months ago) by ad
Branch: MAIN
Changes since 1.265: +11 -18 lines
Diff to previous 1.265 (colored)

Replace some uses of lockmgr().

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

Merge some of the less invasive changes from the vmlocking branch:

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

Revision 1.264 / (download) - annotate - [select for diffs], Sat Jun 30 22:16:38 2007 UTC (5 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.263: +112 -80 lines
Diff to previous 1.263 (colored)

The cd ioctl definitions are not condusive to being called from within
  the kernel (eg from withthe linux compat code).
Add CDIOCREADSUBCHANNEL_BUF and CDIOREADTOCENTRIES_BUF which are like the
  existing ioctls withoutthe _BUF, except that the data area immediately
  follows the control structure (and is fixed length).
Modify scsipi/cd.c so that it only ever has one 'struct cd_formatted_toc'
  allocated on the stack (maybe this info ought to be in the softc)
  structure since even one 800 byte on-stack buffer isn't overly friendly.
cdplay(1) still seems able to read the track-list of an ATAPI cd.

Revision 1.263 / (download) - annotate - [select for diffs], Sat Jun 30 16:00:55 2007 UTC (5 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.262: +18 -20 lines
Diff to previous 1.262 (colored)

Remove a load of unnecessary casts now that 'addr' is 'void *'.

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

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

Revision 1.261 / (download) - annotate - [select for diffs], Sun Jan 14 09:29:24 2007 UTC (6 years, 4 months ago) by martin
Branch: MAIN
CVS Tags: post-newlock2-merge, newlock2-nbase, newlock2-base, ad-audiomp-base, ad-audiomp
Branch point for: yamt-idlelwp
Changes since 1.260: +25 -25 lines
Diff to previous 1.260 (colored)

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.260 / (download) - annotate - [select for diffs], Fri Dec 1 21:23:57 2006 UTC (6 years, 5 months ago) by martin
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, netbsd-4-base
Branch point for: netbsd-4
Changes since 1.259: +27 -27 lines
Diff to previous 1.259 (colored)

Fix PR kern/34202 differently, by aligning the variables "the traditional
way".

Revision 1.259 / (download) - annotate - [select for diffs], Sat Nov 25 12:03:38 2006 UTC (6 years, 6 months ago) by scw
Branch: MAIN
Changes since 1.258: +3 -12 lines
Diff to previous 1.258 (colored)

- Call disk_blocksize(9) when we determine the physical block size of the
  media. (Will this ever be anything other than 2048?)
- bounds_check_with_label() has been fixed, so put the correct partition
  size in the default disklabel.

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

__unused removal on arguments; approved by core.

Revision 1.257 / (download) - annotate - [select for diffs], Tue Nov 14 14:56:55 2006 UTC (6 years, 6 months ago) by reinoud
Branch: MAIN
Changes since 1.256: +44 -2 lines
Diff to previous 1.256 (colored)

Implement/add bufq strategy setting by dkctl for the CD class devices.

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

Revision 1.256 / (download) - annotate - [select for diffs], Sat Oct 28 01:24:29 2006 UTC (6 years, 6 months ago) by reinoud
Branch: MAIN
Changes since 1.255: +25 -2 lines
Diff to previous 1.255 (colored)

Implement another class of `unit not ready' sense handling that is not
fatal.. A `long write in progress' is a retry again later command that is
issued when a device returns immediately after a write request but needs
some time before it can handle read requests.

Revision 1.255 / (download) - annotate - [select for diffs], Fri Oct 27 21:58:59 2006 UTC (6 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.254: +87 -62 lines
Diff to previous 1.254 (colored)

- don't allocate huge arrays on the stack
- no bogus ; after }; in block statements!

Revision 1.254 / (download) - annotate - [select for diffs], Thu Oct 12 01:31:57 2006 UTC (6 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.253: +17 -15 lines
Diff to previous 1.253 (colored)

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

Revision 1.253 / (download) - annotate - [select for diffs], Tue Oct 10 23:35:29 2006 UTC (6 years, 7 months ago) by riz
Branch: MAIN
Changes since 1.252: +3 -3 lines
Diff to previous 1.252 (colored)

Also print blksize with %u - this is what I get for eyeballing
a patch instead of applying it directly.  PR#33966.

Revision 1.252 / (download) - annotate - [select for diffs], Tue Oct 10 23:30:23 2006 UTC (6 years, 7 months ago) by riz
Branch: MAIN
Changes since 1.251: +3 -3 lines
Diff to previous 1.251 (colored)

Print an unsigned parameter with %lu, not %ld.  From David A. Holland
in PR#33966.

Revision 1.251 / (download) - annotate - [select for diffs], Sun Oct 8 07:50:16 2006 UTC (6 years, 7 months ago) by mlelstv
Branch: MAIN
Changes since 1.250: +5 -3 lines
Diff to previous 1.250 (colored)

Use last track info only if it gives a sane value. Fixes PR#34688.

Revision 1.250 / (download) - annotate - [select for diffs], Fri Sep 8 00:33:18 2006 UTC (6 years, 8 months ago) by reinoud
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl
Changes since 1.249: +3 -3 lines
Diff to previous 1.249 (colored)

Oeps! I overlooked the size argument of the SCSI call. It ought to be equal
to the number of bytes we are reading: READ_DISCINFO_BIGSIZE

sorry.

Revision 1.249 / (download) - annotate - [select for diffs], Thu Sep 7 22:52:46 2006 UTC (6 years, 8 months ago) by reinoud
Branch: MAIN
Changes since 1.248: +3 -3 lines
Diff to previous 1.248 (colored)

The size of struct scsipi_read_discinfo_data is not even due to the data[1]
pseudo array in the structure. The scsi command issued used
sizeof(scsipi_read_discinfo_data) but included thus the last byte that
wasn't going to be inspected anyway. Using the constant
READ_DISCINFO_BIGSIZE fixes the bug.

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

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

Revision 1.248 / (download) - annotate - [select for diffs], Fri Sep 1 03:29:32 2006 UTC (6 years, 8 months ago) by matt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base8
Branch point for: newlock2
Changes since 1.247: +4 -4 lines
Diff to previous 1.247 (colored)

Use an unsigned int for the blksize on read_cd_capacity.

Revision 1.247 / (download) - annotate - [select for diffs], Thu Aug 31 21:32:42 2006 UTC (6 years, 8 months ago) by reinoud
Branch: MAIN
Changes since 1.246: +7 -3 lines
Diff to previous 1.246 (colored)

Fix panic on reading/writing to a (raw) CD device and encountering an
error. It now correctly sets bp->b_resid to the full size of the buffer.
The failed SCSI read/write command allways contains the complete buffer.

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

Revision 1.246 / (download) - annotate - [select for diffs], Thu Aug 31 20:22:34 2006 UTC (6 years, 8 months ago) by reinoud
Branch: MAIN
Changes since 1.245: +2 -4 lines
Diff to previous 1.245 (colored)

Remove two spurious empty lines in functions

Revision 1.245 / (download) - annotate - [select for diffs], Thu Aug 31 19:46:54 2006 UTC (6 years, 8 months ago) by reinoud
Branch: MAIN
Changes since 1.244: +3 -3 lines
Diff to previous 1.244 (colored)

Fix fencing bug on CD disk size; the comment was wrong, its the *length* of
the device and since we count from zero its equal to the number of sectors
and thus one higher than the last sector.

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

Revision 1.244 / (download) - annotate - [select for diffs], Mon Aug 28 00:22:15 2006 UTC (6 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.243: +3 -3 lines
Diff to previous 1.243 (colored)

Add missing initializer.

Revision 1.243 / (download) - annotate - [select for diffs], Thu Aug 10 14:45:51 2006 UTC (6 years, 9 months ago) by reinoud
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7
Changes since 1.242: +7 -5 lines
Diff to previous 1.242 (colored)

Fix incorrect `loast possible lba' reporting, remove some empty lines and
add mmc classification for some still rare HD DVD device types.

Revision 1.242 / (download) - annotate - [select for diffs], Thu Mar 30 16:09:28 2006 UTC (7 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base
Branch point for: abandoned-netbsd-4
Changes since 1.241: +4 -4 lines
Diff to previous 1.241 (colored)

Use device_private().

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

Use device_unit().

Revision 1.240 / (download) - annotate - [select for diffs], Wed Feb 8 23:09:15 2006 UTC (7 years, 3 months ago) by reinoud
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.239: +3 -3 lines
Diff to previous 1.239 (colored)

Add name of the processed feature like the others have.

Revision 1.239 / (download) - annotate - [select for diffs], Sat Feb 4 21:26:15 2006 UTC (7 years, 3 months ago) by reinoud
Branch: MAIN
Changes since 1.238: +5 -2 lines
Diff to previous 1.238 (colored)

Add support for SCSI MMC feature 0x0024: hardware assisted defect
management to be passed in mmc_discinfo's device capabilities.

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

Revision 1.238 / (download) - annotate - [select for diffs], Thu Feb 2 14:48:02 2006 UTC (7 years, 3 months ago) by reinoud
Branch: MAIN
Branch point for: simonb-timecounters
Changes since 1.237: +791 -3 lines
Diff to previous 1.237 (colored)

Adding two Ioctl's to scsipi's cd.c to abstract SCSI MMC devices. The
ioctl's and their structures are currenly hidden from inclusion for normal
userland applications to allow the MMC abstraction interface to mature
first.

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

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

Revision 1.237 / (download) - annotate - [select for diffs], Sat Jan 7 07:18:06 2006 UTC (7 years, 4 months ago) by christos
Branch: MAIN
Branch point for: rpaulo-netinet-merge-pcb
Changes since 1.236: +3 -3 lines
Diff to previous 1.236 (colored)

fix typo.

Revision 1.236 / (download) - annotate - [select for diffs], Sat Jan 7 00:26:58 2006 UTC (7 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.235: +1 -1 lines
Diff to previous 1.235 (colored)

remove B_EINTR as it isn't used anymore.

Revision 1.235 / (download) - annotate - [select for diffs], Wed Jan 4 10:13:05 2006 UTC (7 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.234: +7 -14 lines
Diff to previous 1.234 (colored)

- add simple functions to allocate/free a buffer for i/o.
- make bufpool static.

Revision 1.234 / (download) - annotate - [select for diffs], Wed Dec 21 13:11:27 2005 UTC (7 years, 5 months ago) by reinoud
Branch: MAIN
Branch point for: yamt-uio_vmspace
Changes since 1.233: +75 -16 lines
Diff to previous 1.233 (colored)

Improve disc size reporting. The current discsize thats reported is the
current recorded extent and not the complete maximum extent of the disc.

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

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

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

Revision 1.233 / (download) - annotate - [select for diffs], Fri Dec 16 17:54:36 2005 UTC (7 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.232: +2 -4 lines
Diff to previous 1.232 (colored)

delete extraneous verbiage.

Revision 1.232 / (download) - annotate - [select for diffs], Thu Dec 15 17:56:32 2005 UTC (7 years, 5 months ago) by reinoud
Branch: MAIN
Changes since 1.231: +11 -11 lines
Diff to previous 1.231 (colored)

Clean up cdgetdisklabel. It was jumping over a return...

Revision 1.231 / (download) - annotate - [select for diffs], Sun Dec 11 12:23:50 2005 UTC (7 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.230: +6 -6 lines
Diff to previous 1.230 (colored)

merge ktrace-lwp.

Revision 1.230 / (download) - annotate - [select for diffs], Sun Dec 11 00:01:54 2005 UTC (7 years, 5 months ago) by reinoud
Branch: MAIN
CVS Tags: ktrace-lwp-base
Changes since 1.229: +5 -5 lines
Diff to previous 1.229 (colored)

Fix illogical use of extra variable. It was mainly to get a better
readability in KNF. This solution gives better readability without the
extra variable.

Revision 1.229 / (download) - annotate - [select for diffs], Sat Dec 10 21:17:21 2005 UTC (7 years, 5 months ago) by reinoud
Branch: MAIN
Changes since 1.228: +28 -19 lines
Diff to previous 1.228 (colored)

Second stage of read TOC modifications. Introducing the various forms of
TOC reading. Note that the external interfaces haven't changed. Only the
formatted toc is requestable.

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

Revision 1.228 / (download) - annotate - [select for diffs], Sat Oct 15 17:29:25 2005 UTC (7 years, 7 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr
Changes since 1.227: +11 -11 lines
Diff to previous 1.227 (colored)

- change the way to specify a bufq strategy.  (by string rather than by number)
- rather than embedding bufq_state in driver softc,
  have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
  from sys/bufq.h to sys/bufq_impl.h.
  (is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c.  (not tested)

Revision 1.227 / (download) - annotate - [select for diffs], Tue Sep 6 22:19:14 2005 UTC (7 years, 8 months ago) by reinoud
Branch: MAIN
Changes since 1.226: +52 -41 lines
Diff to previous 1.226 (colored)

Cleanup and fix cd_size() function; it was returning wrong results.
Also factor out read_cd_capacity()

Revision 1.226 / (download) - annotate - [select for diffs], Mon Sep 5 21:16:24 2005 UTC (7 years, 8 months ago) by reinoud
Branch: MAIN
Changes since 1.225: +28 -2 lines
Diff to previous 1.225 (colored)

Implement DIOCCACHESYNC for SCSI/ATAPI cd/mmc recordable devices found by
scsipi/cd.c by issueing the SYNCHRONISE CACHES scsi/atapi call as defined
per MMC standard.

Revision 1.225 / (download) - annotate - [select for diffs], Sun Aug 28 22:51:01 2005 UTC (7 years, 8 months ago) by reinoud
Branch: MAIN
Changes since 1.224: +21 -2 lines
Diff to previous 1.224 (colored)

Document executed SCSI commands with the IOCTL's to prevent confusion.

Revision 1.224 / (download) - annotate - [select for diffs], Wed Jul 6 14:28:39 2005 UTC (7 years, 10 months ago) by bouyer
Branch: MAIN
Changes since 1.223: +15 -10 lines
Diff to previous 1.223 (colored)

Always allow open() on the raw partition to succeed, even if any of the
SCSI command in cdopen() fails. Fix PR kern/30288 by Pavel Cahyna.

Revision 1.223 / (download) - annotate - [select for diffs], Sun May 29 22:00:50 2005 UTC (7 years, 11 months ago) by christos
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.222: +68 -68 lines
Diff to previous 1.222 (colored)

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

Revision 1.222 / (download) - annotate - [select for diffs], Mon Apr 25 17:52:30 2005 UTC (8 years, 1 month ago) by drochner
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.221: +4 -5 lines
Diff to previous 1.221 (colored)

fix more SSD_RCODE_VALID misuse introduced in cleanup

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

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

Revision 1.220 / (download) - annotate - [select for diffs], Sun Feb 27 00:27:48 2005 UTC (8 years, 2 months ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Changes since 1.219: +11 -11 lines
Diff to previous 1.219 (colored)

nuke trailing whitespace

Revision 1.219 / (download) - annotate - [select for diffs], Mon Feb 21 00:29:07 2005 UTC (8 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.218: +39 -38 lines
Diff to previous 1.218 (colored)

Part 1 of a cleanup pass over the SCSI subsystem.  The aim is to name
everything "scsi_*", since we really are talking about the SCSI command
set, ATAPI transport not withstanding.  Improve the names of many structures,
and prepend "SCSI_" onto all SCSI command opcodes.  Place items described
by the SCSI Primary Commands document into scsi_spc.h.

Revision 1.218 / (download) - annotate - [select for diffs], Tue Feb 1 00:19:34 2005 UTC (8 years, 3 months ago) by reinoud
Branch: MAIN
CVS Tags: yamt-km-base2, matt-timespec
Changes since 1.217: +34 -34 lines
Diff to previous 1.217 (colored)

Backing out changes to clean up scsipi. I was pointed out there were
problems i hadn't seen. To prevent lossage i'd decided to back off all
changes and let them be reviewed on tech-kern.

Revision 1.217 / (download) - annotate - [select for diffs], Mon Jan 31 23:39:02 2005 UTC (8 years, 3 months ago) by reinoud
Branch: MAIN
Changes since 1.216: +12 -12 lines
Diff to previous 1.216 (colored)

Fix LP64 problems introduced by my u_long->uint32_t conversion.

Revision 1.216 / (download) - annotate - [select for diffs], Mon Jan 31 23:06:41 2005 UTC (8 years, 3 months ago) by reinoud
Branch: MAIN
Changes since 1.215: +32 -32 lines
Diff to previous 1.215 (colored)

Part of the cleanup of sys/scsipi's use of types; rename all u_int* to
uint* and change the u_long's to uint32_t's where possible. Note that the
iocl definitions/hooks have to be ulong (or u_long) or they'll bomb out.

Revision 1.215 / (download) - annotate - [select for diffs], Mon Jan 31 21:13:16 2005 UTC (8 years, 3 months ago) by reinoud
Branch: MAIN
Changes since 1.214: +5 -5 lines
Diff to previous 1.214 (colored)

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

Revision 1.214 / (download) - annotate - [select for diffs], Sun Jan 30 23:42:58 2005 UTC (8 years, 3 months ago) by reinoud
Branch: MAIN
Changes since 1.213: +2 -2 lines
Diff to previous 1.213 (colored)

As in revision 1.213, not all information is returned in read-TOC format 0. In order to add a new generic read-toc ioctl, i renamed the origional to _f0 to indicate its only format 0. The routines can then be changed one at a time to the new generic calling. This patch fixes two calls i'd overseen.... silly me forgot to recompile :(

Revision 1.213 / (download) - annotate - [select for diffs], Sun Jan 30 23:39:42 2005 UTC (8 years, 3 months ago) by reinoud
Branch: MAIN
Changes since 1.212: +9 -8 lines
Diff to previous 1.212 (colored)

The code asumes all programs want to know is TOC response format 0. Support
for TOC response format 1 and 2 are mandatory on CD/DVD too and provide
more information.

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

Revision 1.212 / (download) - annotate - [select for diffs], Tue Dec 7 23:07:31 2004 UTC (8 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-km-base, kent-audio1-beforemerge
Branch point for: yamt-km, kent-audio2
Changes since 1.211: +6 -6 lines
Diff to previous 1.211 (colored)

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

Revision 1.211 / (download) - annotate - [select for diffs], Thu Oct 28 07:07:45 2004 UTC (8 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: kent-audio1-base, kent-audio1
Changes since 1.210: +3 -2 lines
Diff to previous 1.210 (colored)

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

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

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

Revision 1.209 / (download) - annotate - [select for diffs], Sat Sep 18 00:08:16 2004 UTC (8 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.208: +64 -65 lines
Diff to previous 1.208 (colored)

Standardize some variable names and the calling pattern for scsipi_command().
Use void pointer casts.

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

Remove the "xfer" argument to scsipi_command().

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

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

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

Do not manipulate xs->bp in "generic" code -- do it only in the psw_done
routine.  As part of this, pass down our pre-parsed error code -- though this
interface will probably change later to accomodate better error handling.

Revision 1.205 / (download) - annotate - [select for diffs], Thu Sep 9 19:35:30 2004 UTC (8 years, 8 months ago) by bouyer
Branch: MAIN
Changes since 1.204: +39 -32 lines
Diff to previous 1.204 (colored)

Make the xxstart() functions reentrant again, as some drivers HBA can call
scsipi_done() from their scsipi_request().
For this, add a struct scsipi_xfer * argument to scsipi_command().
If not NULL scsipi_command() will use this to enqueue this xfer, otherwise
it'll try to allocate a new one. This scsipi_xfer has to be allocated
and initialised by scsipi_make_xs() or equivalent.
In xxstart(), allocate a scsipi_xfer using scsipi_make_xs(), and if not NULL,
dequeue the buffer before calling scsipi_command(). This makes sure that
scsipi_command() will not fail, and also makes sure that xxstart() won't
be called again between the BUFQ_PEEK() and BUFQ_GET().

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

Revision 1.204 / (download) - annotate - [select for diffs], Mon Sep 6 20:38:14 2004 UTC (8 years, 8 months ago) by bouyer
Branch: MAIN
Changes since 1.203: +3 -3 lines
Diff to previous 1.203 (colored)

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

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

Improve handling of memory shortage, to fix problems like:
sd3(mpt0:0:1:0): unable to allocate scsipi_xfer
sd3: not queued, error 12
Havard Eidnes's analysis of this problem is that the scsipi_xfer pool is
competing for resources with other pools, including the the inode and vnode
pools which can grow quite large.

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

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

Revision 1.202 / (download) - annotate - [select for diffs], Sat Aug 21 17:40:25 2004 UTC (8 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.201: +162 -265 lines
Diff to previous 1.201 (colored)

Use ANSI function decls and make use of static.

Revision 1.201 / (download) - annotate - [select for diffs], Sat Apr 24 09:26:14 2004 UTC (9 years, 1 month ago) by pk
Branch: MAIN
Changes since 1.200: +77 -25 lines
Diff to previous 1.200 (colored)

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

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

Revision 1.200 / (download) - annotate - [select for diffs], Sun Feb 22 00:26:43 2004 UTC (9 years, 3 months ago) by enami
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.199: +3 -3 lines
Diff to previous 1.199 (colored)

Backout an obvious bug introduced in rev. 1.145.

Revision 1.199 / (download) - annotate - [select for diffs], Sat Jan 10 14:39:50 2004 UTC (9 years, 4 months ago) by yamt
Branch: MAIN
Changes since 1.198: +5 -2 lines
Diff to previous 1.198 (colored)

store a i/o priority hint in struct buf for buffer queue discipline.

Revision 1.198 / (download) - annotate - [select for diffs], Mon Nov 10 08:51:52 2003 UTC (9 years, 6 months ago) by wiz
Branch: MAIN
Changes since 1.197: +4 -4 lines
Diff to previous 1.197 (colored)

Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.

Revision 1.197 / (download) - annotate - [select for diffs], Thu Sep 18 00:06:32 2003 UTC (9 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.196: +3 -3 lines
Diff to previous 1.196 (colored)

Merge the geometry and cache handling code for all direct access and optical
devices, as it's general to all SCSI MMC devices.  In the process, remove
PQUIRK_NO_FLEX_PAGE.

Revision 1.196 / (download) - annotate - [select for diffs], Sat Sep 13 15:49:04 2003 UTC (9 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.195: +3 -3 lines
Diff to previous 1.195 (colored)

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

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

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

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

In the test for whether to start the unit, I used the wrong error code.
ENODEV is only returned when we get "medium not present," which we can fail
immediately on.  All other "not ready" cases return EIO.

Revision 1.193 / (download) - annotate - [select for diffs], Mon Sep 8 23:44:29 2003 UTC (9 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.192: +5 -5 lines
Diff to previous 1.192 (colored)

Oops.  Fix a typo in cd_mode_select().

Revision 1.192 / (download) - annotate - [select for diffs], Mon Sep 8 18:51:34 2003 UTC (9 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.191: +28 -33 lines
Diff to previous 1.191 (colored)

Do a START UNIT only if the TEST UNIT READY reports that the device is not
ready.  This avoids gratuitously starting the motor on floppy and CD-ROM
drives, and eliminates the need for the audio playing test in cdopen().

Therefore, also remove PQUIRK_NOSTARTUNIT.

Revision 1.191 / (download) - annotate - [select for diffs], Mon Sep 8 16:16:43 2003 UTC (9 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.190: +51 -70 lines
Diff to previous 1.190 (colored)

Attempt to deal with Martin's weirdass Sun drive by setting the mode sense
allocation length a little more precisely -- add the space for the header in
cd_mode_sense().  Also delete the XS_CTL_SILENT, since we really do want to
see errors.

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

Revision 1.190 / (download) - annotate - [select for diffs], Mon Sep 8 01:56:33 2003 UTC (9 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.189: +57 -19 lines
Diff to previous 1.189 (colored)

Eliminate the separate ATAPI and SCSI attachments for "cd".

Revision 1.189 / (download) - annotate - [select for diffs], Mon Sep 8 01:13:04 2003 UTC (9 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.188: +5 -9 lines
Diff to previous 1.188 (colored)

Nuke some printf()s.

Revision 1.188 / (download) - annotate - [select for diffs], Sun Sep 7 22:11:23 2003 UTC (9 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.187: +324 -41 lines
Diff to previous 1.187 (colored)

Set PQUIRK_ONLYBIG in the wdc-atapi frontend, obviating the need to ever test
the "bus type" for this.

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

Revision 1.187 / (download) - annotate - [select for diffs], Fri Jul 18 14:33:54 2003 UTC (9 years, 10 months ago) by wiz
Branch: MAIN
Changes since 1.186: +3 -3 lines
Diff to previous 1.186 (colored)

Add a cast to avoid an integer overflow.
Fixes playing (at least some) DVDs.
Patch from Tsubai Masanari (tsubai at iri.co.jp) -- thanks a lot!

Revision 1.186 / (download) - annotate - [select for diffs], Thu Jul 10 18:18:40 2003 UTC (9 years, 10 months ago) by martin
Branch: MAIN
Changes since 1.185: +12 -2 lines
Diff to previous 1.185 (colored)

If a CD drive reports != 2048 byte block size, try to change it into
2048 byte mode. Fixes PR kern/22090.
Reviewed by Manuel Bouyer.

Revision 1.185 / (download) - annotate - [select for diffs], Sun Jun 29 22:30:37 2003 UTC (9 years, 10 months ago) by fvdl
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.184: +7 -7 lines
Diff to previous 1.184 (colored)

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

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

Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V

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

Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.

Revision 1.182 / (download) - annotate - [select for diffs], Fri May 2 08:45:29 2003 UTC (10 years ago) by dsl
Branch: MAIN
Changes since 1.181: +3 -3 lines
Diff to previous 1.181 (colored)

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

Revision 1.181 / (download) - annotate - [select for diffs], Thu Apr 3 22:18:24 2003 UTC (10 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.180: +13 -5 lines
Diff to previous 1.180 (colored)

Check RAW_PART against the media size instead of the disklabel.
Add the media size in 512-byte sectors to the softc, to avoid
some 64 bit computations. Bump the capacity stored in softcs
for disks to 64 bits.

Revision 1.180 / (download) - annotate - [select for diffs], Thu Mar 20 05:49:21 2003 UTC (10 years, 2 months ago) by dbj
Branch: MAIN
Changes since 1.179: +3 -3 lines
Diff to previous 1.179 (colored)

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

Revision 1.179 / (download) - annotate - [select for diffs], Tue Feb 25 20:35:37 2003 UTC (10 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.178: +4 -5 lines
Diff to previous 1.178 (colored)

Add a new BUF_INIT() macro which initializes b_dep and b_interlock, and
use it.  This fixes a few places where either b_dep or b_interlock were
not properly initialized.

Revision 1.178 / (download) - annotate - [select for diffs], Wed Feb 5 21:38:41 2003 UTC (10 years, 3 months ago) by pk
Branch: MAIN
Changes since 1.177: +3 -2 lines
Diff to previous 1.177 (colored)

Make the buffer cache code MP-safe.

Revision 1.177 / (download) - annotate - [select for diffs], Mon Feb 3 23:50:59 2003 UTC (10 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.176: +3 -3 lines
Diff to previous 1.176 (colored)

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

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

Being able to make image backups of your whole disk, not to mention not
causing certain ata disks to lock up by reading beyond the last block,
beats catering to broken devices.

bounds_check_with_label() RAW_PART too.

Revision 1.175 / (download) - annotate - [select for diffs], Mon Jan 20 05:30:09 2003 UTC (10 years, 4 months ago) by simonb
Branch: MAIN
Changes since 1.174: +3 -3 lines
Diff to previous 1.174 (colored)

The Double-Semi-Colon Police.

Revision 1.174 / (download) - annotate - [select for diffs], Mon Jan 13 03:32:56 2003 UTC (10 years, 4 months ago) by toshii
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base
Changes since 1.173: +7 -7 lines
Diff to previous 1.173 (colored)

Use the correct byte positions to read data returned by DVD_LU_SEND_RPC_STATE.

Revision 1.173 / (download) - annotate - [select for diffs], Sun Dec 15 17:48:14 2002 UTC (10 years, 5 months ago) by jmcneill
Branch: MAIN
CVS Tags: gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.172: +5 -6 lines
Diff to previous 1.172 (colored)

Another sizeof -> 4 + 2048 fix for dvd_read_manufact after malloc changes

Revision 1.172 / (download) - annotate - [select for diffs], Sun Dec 15 17:43:50 2002 UTC (10 years, 5 months ago) by jmcneill
Branch: MAIN
Changes since 1.171: +5 -6 lines
Diff to previous 1.171 (colored)

In dvd_read_disckey, sizeof(buf) is no longer '4 + 2048' after the
malloc change. Replace 'sizeof(buf)' with '4 + 2048' -- this makes
dvd_read_disckey work properly again.

Revision 1.171 / (download) - annotate - [select for diffs], Sun Dec 15 01:55:44 2002 UTC (10 years, 5 months ago) by fvdl
Branch: MAIN
Changes since 1.170: +60 -34 lines
Diff to previous 1.170 (colored)

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

Revision 1.170 / (download) - annotate - [select for diffs], Sat Nov 9 18:58:26 2002 UTC (10 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.169: +4 -4 lines
Diff to previous 1.169 (colored)

Fix signed/unsigned comparison warnings.

Revision 1.169 / (download) - annotate - [select for diffs], Fri Nov 1 11:31:59 2002 UTC (10 years, 6 months ago) by mrg
Branch: MAIN
Changes since 1.168: +5 -4 lines
Diff to previous 1.168 (colored)

implement separate read/write disk statistics:
	- disk_unbusy() gets a new parameter to tell the IO direction.
	- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
	when processing hw.diskstats, add the read&write bytes/transfers for
	the old combined stats to attempt to keep backwards compatibility.

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

this is just the kernel portion.

Revision 1.168 / (download) - annotate - [select for diffs], Wed Oct 23 09:13:44 2002 UTC (10 years, 7 months ago) by jdolecek
Branch: MAIN
CVS Tags: kqueue-aftermerge
Changes since 1.167: +3 -3 lines
Diff to previous 1.167 (colored)

merge kqueue branch into -current

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

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

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

Revision 1.167 / (download) - annotate - [select for diffs], Wed Sep 18 01:46:23 2002 UTC (10 years, 8 months ago) by chs
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-base
Changes since 1.166: +2 -6 lines
Diff to previous 1.166 (colored)

remove all vesitages of dk_establish().

Revision 1.166 / (download) - annotate - [select for diffs], Fri Sep 6 13:23:29 2002 UTC (10 years, 8 months ago) by gehenna
Branch: MAIN
Changes since 1.165: +22 -8 lines
Diff to previous 1.165 (colored)

Merge the gehenna-devsw branch into the trunk.

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

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

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

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

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

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

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

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

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

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

Remove the old device buffer queue interface.

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

Revision 1.164 / (download) - annotate - [select for diffs], Mon Jul 22 14:59:43 2002 UTC (10 years, 10 months ago) by hannken
Branch: MAIN
Changes since 1.163: +9 -9 lines
Diff to previous 1.163 (colored)

Convert to new device buffer queue interface.

Revision 1.163 / (download) - annotate - [select for diffs], Mon May 27 16:42:30 2002 UTC (11 years ago) by drochner
Branch: MAIN
Changes since 1.162: +48 -24 lines
Diff to previous 1.162 (colored)

put multisession offset code into a separate function and initialize
the p_cdsession field of partition 'a' in the default disklabel

Revision 1.162 / (download) - annotate - [select for diffs], Sun May 5 15:16:31 2002 UTC (11 years ago) by bouyer
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6
Branch point for: gehenna-devsw
Changes since 1.161: +4 -3 lines
Diff to previous 1.161 (colored)

If periph->periph_callout is already active, don't freeze the periph again:
scispi_periph_timed_thaw() will be called only one time anyway.

Revision 1.161 / (download) - annotate - [select for diffs], Sun Dec 9 22:56:10 2001 UTC (11 years, 5 months ago) by veego
Branch: MAIN
CVS Tags: newlock-base, newlock, ifpoll-base, ifpoll, eeh-devprop-base, eeh-devprop
Changes since 1.160: +31 -2 lines
Diff to previous 1.160 (colored)

Support for dvd region code (RPC).

Revision 1.160 / (download) - annotate - [select for diffs], Thu Nov 15 09:48:16 2001 UTC (11 years, 6 months ago) by lukem
Branch: MAIN
Changes since 1.159: +2 -3 lines
Diff to previous 1.159 (colored)

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

Revision 1.159 / (download) - annotate - [select for diffs], Tue Nov 13 06:56:39 2001 UTC (11 years, 6 months ago) by lukem
Branch: MAIN
Changes since 1.158: +4 -1 lines
Diff to previous 1.158 (colored)

add RCSIDs

Revision 1.158 / (download) - annotate - [select for diffs], Mon Oct 22 16:16:00 2001 UTC (11 years, 7 months ago) by bouyer
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache
Changes since 1.157: +3 -3 lines
Diff to previous 1.157 (colored)

We can't have XS_CTL_DATA_OUT and XS_CTL_DATA_IN at the same time.
Pointed out by Bernd Ernesti.

Revision 1.157 / (download) - annotate - [select for diffs], Sun Sep 2 13:11:53 2001 UTC (11 years, 8 months ago) by tsutsui
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp
Changes since 1.156: +19 -32 lines
Diff to previous 1.156 (colored)

Use be16toh(), be32toh(), le16toh() and le32toh() rather than
ntohs(), ntohl() or homegrown bswap() functions.

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

Revision 1.156 / (download) - annotate - [select for diffs], Mon Aug 20 15:45:10 2001 UTC (11 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.155: +17 -31 lines
Diff to previous 1.155 (colored)

Don't special case the retry for Media Changed... More later.

Revision 1.155 / (download) - annotate - [select for diffs], Mon Aug 20 11:31:10 2001 UTC (11 years, 9 months ago) by ad
Branch: MAIN
Changes since 1.154: +57 -33 lines
Diff to previous 1.154 (colored)

Two changes submitted by Sergey Svishchev <svs@ropnet.ru>:

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

Revision 1.154 / (download) - annotate - [select for diffs], Wed Aug 15 22:21:01 2001 UTC (11 years, 9 months ago) by eeh
Branch: MAIN
Changes since 1.153: +184 -4 lines
Diff to previous 1.153 (colored)

Add support for smaller sector sizes so we can mount ffs filesystems.

Revision 1.153 / (download) - annotate - [select for diffs], Wed Jul 18 18:25:41 2001 UTC (11 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.152: +2 -2 lines
Diff to previous 1.152 (colored)

bcopy -> memcpy

Revision 1.152 / (download) - annotate - [select for diffs], Wed Jul 18 18:21:04 2001 UTC (11 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.151: +11 -11 lines
Diff to previous 1.151 (colored)

bzero -> memset

Revision 1.151 / (download) - annotate - [select for diffs], Tue Jun 26 15:32:03 2001 UTC (11 years, 11 months ago) by bouyer
Branch: MAIN
Branch point for: kqueue
Changes since 1.150: +8 -4 lines
Diff to previous 1.150 (colored)

Add a XS_CTL_SILENT_NODEV flag: if the sense info is "not ready, medium
not present" don't print any message but still return ENODEV.
Use this in cd driver to allow open of character raw partition even if
the drive is empty (older drives fails at LOAD_UNLOAD time, newer
ones fail at TEST_UNIT_READY time).

Revision 1.150 / (download) - annotate - [select for diffs], Sun May 20 21:07:58 2001 UTC (12 years ago) by christos
Branch: MAIN
Changes since 1.149: +14 -14 lines
Diff to previous 1.149 (colored)

PR/12991: Dave Huang: DVD ioctls don't work because we send the wrong size
CDB (16 instead of 12).

Revision 1.149 / (download) - annotate - [select for diffs], Thu May 17 20:02:56 2001 UTC (12 years ago) by bouyer
Branch: MAIN
Changes since 1.148: +2 -2 lines
Diff to previous 1.148 (colored)

SDEV_DB -> SCSIPI_DB

Revision 1.148 / (download) - annotate - [select for diffs], Sun May 6 18:30:56 2001 UTC (12 years ago) by drochner
Branch: MAIN
Changes since 1.147: +7 -5 lines
Diff to previous 1.147 (colored)

Since __HAVE_OLD_DISKLABEL, DISKMINOR(u, p) isn't continuous over "p"
anymore. So we can't pass a range to vdevgone() but have to loop over the
partitions explicitely.
(otherwise the next device unit will be killed)

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

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

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

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

Revision 1.145 / (download) - annotate - [select for diffs], Wed Apr 25 17:53:38 2001 UTC (12 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.144: +150 -125 lines
Diff to previous 1.144 (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.144 / (download) - annotate - [select for diffs], Fri Jan 19 22:47:46 2001 UTC (12 years, 4 months ago) by kenh
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Changes since 1.143: +41 -2 lines
Diff to previous 1.143 (colored)

Retry requests if the CD-ROM drive returns the sense code "Device in
Process of Becoming Ready".

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

Return error in the case of using ODIOCGDINFO or ODIOCGDEFLABEL when
the number of partitions is > OLDMAXPARTITIONS. This is better
than silently truncating the label (don't want to silently throw
away partitions when using an old disklabel binary on a label with
> 8 partitions). From Enami Tsugutomo.

Revision 1.142 / (download) - annotate - [select for diffs], Sun Jan 7 18:09:03 2001 UTC (12 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.141: +39 -2 lines
Diff to previous 1.141 (colored)

Adapt all disk devices in MI directories to handle ODIOC* calls
for ports that have bumped MAXPARTITIONS (and thus define
__HAVE_OLD_DISKLABEL).

Revision 1.141 / (download) - annotate - [select for diffs], Fri Jun 9 08:54:19 2000 UTC (12 years, 11 months ago) by enami
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Changes since 1.140: +44 -28 lines
Diff to previous 1.140 (colored)

Prevent a process being swapped out during I/O if the data buffer is
allocated on stack.  This potential problem is noticed by Noriyuki Soda
and the idea and sample code to fix is given by Jason R. Thorpe.

Revision 1.140 / (download) - annotate - [select for diffs], Tue May 30 01:08:23 2000 UTC (12 years, 11 months ago) by augustss
Branch: MAIN
Changes since 1.139: +3 -2 lines
Diff to previous 1.139 (colored)

Add a quirk, SDEV_ONLYBIG, which implies that the device cannot handle
the 6 byte versions of READ, WRITE, and MODE_SENSE.
This greatly simplifies the UFI (USB Floppy) handling.

Revision 1.139 / (download) - annotate - [select for diffs], Tue May 16 05:45:52 2000 UTC (13 years ago) by thorpej
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.138: +2 -2 lines
Diff to previous 1.138 (colored)

Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc.  Those
platforms should be changed to use device_register().  In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.

Revision 1.138 / (download) - annotate - [select for diffs], Thu Mar 30 00:00:55 2000 UTC (13 years, 1 month ago) by augustss
Branch: MAIN
Changes since 1.137: +4 -4 lines
Diff to previous 1.137 (colored)

Get rid of register declarations.

Revision 1.137 / (download) - annotate - [select for diffs], Mon Mar 13 23:52:36 2000 UTC (13 years, 2 months ago) by soren
Branch: MAIN
Changes since 1.136: +2 -2 lines
Diff to previous 1.136 (colored)

Fix doubled 'the's in comments.

Revision 1.136 / (download) - annotate - [select for diffs], Mon Feb 7 20:16:56 2000 UTC (13 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.135: +25 -18 lines
Diff to previous 1.135 (colored)

Fix a bug in disksort_*() which caused non-optimal ordering when multiple
active partitions were on a single spindle.  Add a b_rawblkno member to
struct buf which contains the non-partition-relative block number to sort
by.

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

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

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

use __vax__ and __i386__ instead of vax and i386

Revision 1.133 / (download) - annotate - [select for diffs], Sun Oct 31 14:03:16 1999 UTC (13 years, 6 months ago) by mycroft
Branch: MAIN
CVS Tags: comdex-fall-1999-base, comdex-fall-1999
Changes since 1.132: +4 -4 lines
Diff to previous 1.132 (colored)

Fix the size of start_sector, end_sector and end_sector_l0.  (I'm just going to
assume the Linux people will also fix this, since I reported it to them.)

Revision 1.132 / (download) - annotate - [select for diffs], Fri Oct 29 15:02:57 1999 UTC (13 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.131: +297 -1 lines
Diff to previous 1.131 (colored)

Emulate the Linux DVD_* ioctls(2).  This gets us 90% of the way to running the
LiViD DVD player.  (See forthcoming mail to current-users.)
XXX NOTE: We should do something to probe capabilities, rather than allowing
these ioctls on any device.

Revision 1.131 / (download) - annotate - [select for diffs], Sun Oct 17 09:44:48 1999 UTC (13 years, 7 months ago) by ragge
Branch: MAIN
Branch point for: thorpej_scsipi, fvdl-softdep
Changes since 1.130: +2 -2 lines
Diff to previous 1.130 (colored)

Don't call dk_establish() on vax either.

Revision 1.130 / (download) - annotate - [select for diffs], Thu Sep 30 22:57:53 1999 UTC (13 years, 7 months ago) by thorpej
Branch: MAIN
Branch point for: wrstuden-devbsize
Changes since 1.129: +20 -18 lines
Diff to previous 1.129 (colored)

Cleanup the scsipi_xfer flags:
- `flags' is now gone, replaced with `xs_control' and `xs_status'.
- Massive cleanup of the control flags.  Now we explicitly say that
  a job is to complete asynchronously, rather than relying on side-effects,
  and use a new flag to now that device discovery is being performed.
- Do SCSI device discovery interrupt-driven.

Revision 1.129 / (download) - annotate - [select for diffs], Thu Sep 23 11:04:33 1999 UTC (13 years, 8 months ago) by enami
Branch: MAIN
Changes since 1.128: +79 -1 lines
Diff to previous 1.128 (colored)

Allow to detach wdc, atapibus, wd and cd.

Revision 1.128 / (download) - annotate - [select for diffs], Sat Aug 7 02:51:51 1999 UTC (13 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.127: +8 -8 lines
Diff to previous 1.127 (colored)

Increase several timeouts to 30s.

Revision 1.127 / (download) - annotate - [select for diffs], Thu May 27 11:19:04 1999 UTC (14 years ago) by bouyer
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.126: +3 -2 lines
Diff to previous 1.126 (colored)

in cdclose(), ignore "media change" when calling scsipi_prevent(), after
a 'eject -l' some ATAPI drives report this instead of illegal request.

Revision 1.126 / (download) - annotate - [select for diffs], Thu Apr 8 16:12:31 1999 UTC (14 years, 1 month ago) by bouyer
Branch: MAIN
Changes since 1.125: +2 -2 lines
Diff to previous 1.125 (colored)

Add SCSI_IGNORE_NOT_READY to the flags for CDIOCCLOSE: some devices will
attempt to spin up, and report an error if there's no CD. Fixes port-i386/7345.

Revision 1.125 / (download) - annotate - [select for diffs], Mon Apr 5 19:19:34 1999 UTC (14 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.124: +9 -6 lines
Diff to previous 1.124 (colored)

If scsipi_command() fails, always print out the error code.

Revision 1.124 / (download) - annotate - [select for diffs], Sun Feb 28 17:14:57 1999 UTC (14 years, 2 months ago) by explorer
Branch: MAIN
CVS Tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Changes since 1.123: +3 -2 lines
Diff to previous 1.123 (colored)

Update to slightly altered rnd_attach_source() api

Revision 1.123 / (download) - annotate - [select for diffs], Mon Feb 15 18:41:04 1999 UTC (14 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.122: +3 -2 lines
Diff to previous 1.122 (colored)

For CDIOCCLOSE, ignore media changes, as some drive seems to return this
info here.

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

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

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

Change DIOCEJECT to do what's needed to eject a device before the eject
command (unlock for sd and cd) if no other partitions are open, return
EBUSY otherwise. DIOCEJECT will have the old semantic if its argument is not
0. The old ioctl has been renamed to ODIOCEJECT for binary compatibility.

Revision 1.120 / (download) - annotate - [select for diffs], Fri Jan 29 11:17:58 1999 UTC (14 years, 3 months ago) by bouyer
Branch: MAIN
Changes since 1.119: +14 -6 lines
Diff to previous 1.119 (colored)

Return ENODEV instead of EIO when we are trying to open a device without media
in the drive. restrict "opening of empty drive" to character devices only
(reading a block device returns a short read instead of ENODEV, which can lead
to confusion).

Revision 1.119 / (download) - annotate - [select for diffs], Tue Jan 26 13:59:44 1999 UTC (14 years, 4 months ago) by bouyer
Branch: MAIN
Changes since 1.118: +57 -18 lines
Diff to previous 1.118 (colored)

Allows the raw partition to be open()'ed, even when scsipi_start() fails
(no media or other ...) so that we can always send ioctl's to the device.

Revision 1.118 / (download) - annotate - [select for diffs], Mon Jan 4 15:32:08 1999 UTC (14 years, 4 months ago) by is
Branch: MAIN
Changes since 1.117: +42 -8 lines
Diff to previous 1.117 (colored)

Multisession-CD-Support, by Torsten Duwe <duwe@ns.lst.de>.

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

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

Revision 1.116 / (download) - annotate - [select for diffs], Fri Nov 20 00:35:39 1998 UTC (14 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.115: +15 -2 lines
Diff to previous 1.115 (colored)

Add adapter reference counting for SCSI and ATAPI devices.

Revision 1.115 / (download) - annotate - [select for diffs], Mon Aug 17 00:49:01 1998 UTC (14 years, 9 months ago) by mycroft
Branch: MAIN
CVS Tags: chs-ubc-base, chs-ubc
Changes since 1.114: +23 -16 lines
Diff to previous 1.114 (colored)

Assign my copyrights to TNF.

Revision 1.114 / (download) - annotate - [select for diffs], Wed Aug 5 16:29:04 1998 UTC (14 years, 9 months ago) by drochner
Branch: MAIN
Changes since 1.113: +14 -3 lines
Diff to previous 1.113 (colored)

Improve generation of default disklabels:
-store printable product ID in cd's and sd's softc, use it as "typename"
-for this, add a "destination buffer length" argument to scsipi_strvis()
-return ATAPI device type for ATAPI devices

Revision 1.113 / (download) - annotate - [select for diffs], Mon Jul 13 12:04:29 1998 UTC (14 years, 10 months ago) by hpeyerl
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.112: +7 -1 lines
Diff to previous 1.112 (colored)

Add support for ATA CD changer devices like the NEC CDR-251.
Evidence of managerial coding removed by Victor T. Cleaner (thorpej)

Revision 1.112 / (download) - annotate - [select for diffs], Mon Mar 16 04:17:53 1998 UTC (15 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.111: +3 -1 lines
Diff to previous 1.111 (colored)

Implement CDIOCCLOSE.

Revision 1.111 / (download) - annotate - [select for diffs], Thu Jan 15 19:56:03 1998 UTC (15 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.110: +3 -3 lines
Diff to previous 1.110 (colored)

move the 'cd_cd' declaration back up to where it was before
the config changes were made.  Though the nature of the declaration
had to change, there wasn't a reason to change its location.

Revision 1.110 / (download) - annotate - [select for diffs], Thu Jan 15 02:21:31 1998 UTC (15 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.109: +18 -17 lines
Diff to previous 1.109 (colored)

add support for an ATAPI attachment for 'sd'.
fix 'cd' driver's NCD_SCSI bogosity (was using testing wrong macro!)
clean up in various ways:
* make common atapi_mode_{sense,select}() functions.
* put ATAPI data structures in more sensible headers, split up by
  device type.
* include headers a bit more carefully.
* pass flags to attachment-specific cd functions, and use them.
* get rid of SCSI bits in scsipi_base.h's scsipi_make_xs(), move
  them into the correct place in scsi_base.c.
* fix minor typo in struct name in scsipiconf.h (which was apparently
  never used except in a #define later in the same file).
* use __attribute__ to force 4-byte alignment for xs command store,
  so that architectures trying to bus_space_write_multi_N() (where
  N > 1) that data to a controller won't lose.
* clean up a few comments in typos, and make a few #defines easier to
  understand/maintain.
* rename cd_link.h to cdvar.h (via repository copy).  This is exactly
  what a 'var' file is supposed to be.

Revision 1.109 / (download) - annotate - [select for diffs], Mon Jan 12 09:49:11 1998 UTC (15 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.108: +3 -5 lines
Diff to previous 1.108 (colored)

Adjust for changes to config.

Revision 1.108 / (download) - annotate - [select for diffs], Tue Dec 2 03:57:54 1997 UTC (15 years, 5 months ago) by mikel
Branch: MAIN
Changes since 1.107: +2 -2 lines
Diff to previous 1.107 (colored)

fix typo; from Dave Sainty in PR kern/4602

Revision 1.107 / (download) - annotate - [select for diffs], Sat Oct 18 19:50:51 1997 UTC (15 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA
Branch point for: netbsd-1-3
Changes since 1.106: +11 -12 lines
Diff to previous 1.106 (colored)

Implement two macros, scsipi_command() and scsipi_command_direct(), and
use them to hide the structure of the function pointers we jump through
to issue a command.

Revision 1.106 / (download) - annotate - [select for diffs], Mon Oct 13 00:47:49 1997 UTC (15 years, 7 months ago) by explorer
Branch: MAIN
CVS Tags: marc-pcmcia-base
Changes since 1.105: +9 -1 lines
Diff to previous 1.105 (colored)

o Make usage of /dev/random dependant on
  pseudo-device   rnd                     # /dev/random and in-kernel generator
  in config files.

o Add declaration to all architectures.

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

Revision 1.105 / (download) - annotate - [select for diffs], Fri Oct 10 01:09:03 1997 UTC (15 years, 7 months ago) by explorer
Branch: MAIN
Changes since 1.104: +7 -2 lines
Diff to previous 1.104 (colored)

Add hooks to insert timing info into the random system

Revision 1.104 / (download) - annotate - [select for diffs], Wed Oct 8 23:05:22 1997 UTC (15 years, 7 months ago) by thorpej
Branch: MAIN
Changes since 1.103: +26 -11 lines
Diff to previous 1.103 (colored)

Implement DIOCGDEFLABEL.

Revision 1.103 / (download) - annotate - [select for diffs], Wed Oct 1 01:18:44 1997 UTC (15 years, 7 months ago) by enami
Branch: MAIN
Changes since 1.102: +173 -165 lines
Diff to previous 1.102 (colored)

Cosmetic changes to keep coding style consistency in this directory;

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

Revision 1.102 / (download) - annotate - [select for diffs], Tue Sep 9 09:07:43 1997 UTC (15 years, 8 months ago) by bouyer
Branch: MAIN
Changes since 1.101: +8 -9 lines
Diff to previous 1.101 (colored)

Uses PLAY_MSF instead of PLAY for the CDIOCPLAYTRACKS ioctl. This avoid a int16
overflow in the PLAY cbd when the resquested track(s) are more than 65535
blocks long. Submitted by t-nkyma@tcp-ip.or.jp in PR kern/4092.

Revision 1.101 / (download) - annotate - [select for diffs], Wed Aug 27 11:26:19 1997 UTC (15 years, 9 months ago) by bouyer
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal
Branch point for: marc-pcmcia
Changes since 1.100: +277 -343 lines
Diff to previous 1.100 (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.100 / (download) - annotate - [select for diffs], Wed Apr 2 02:29:30 1997 UTC (16 years, 1 month ago) by mycroft
Branch: MAIN
CVS Tags: bouyer-scsipi
Changes since 1.99: +7 -10 lines
Diff to previous 1.99 (colored)

Push the buffer cleanup code into scsi_done(), and split it so that biodone()
is called *after* the driver `done' routine.  This fixes disk I/O statistics
on SCSI devices.

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

Revision 1.99 / (download) - annotate - [select for diffs], Sat Mar 29 21:37:55 1997 UTC (16 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.98: +2 -2 lines
Diff to previous 1.98 (colored)

PR/3409: Koji Imada: cdsize() timeout too short for cd changers.

Revision 1.98 / (download) - annotate - [select for diffs], Fri Feb 21 23:03:25 1997 UTC (16 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.97: +2 -1 lines
Diff to previous 1.97 (colored)

If posting an error condition because the media has been unloaded,
make sure to set the residual count to reflect that no data was
transfered.

From Naofumi HONDA / MINOURA Makoto, PR #3007.

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

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

Revision 1.96 / (download) - annotate - [select for diffs], Sat Oct 12 23:23:13 1996 UTC (16 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.95: +3 -3 lines
Diff to previous 1.95 (colored)

revert previous kprintf change

Revision 1.95 / (download) - annotate - [select for diffs], Thu Oct 10 23:34:14 1996 UTC (16 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.94: +3 -3 lines
Diff to previous 1.94 (colored)

printf -> kprintf, sprintf -> ksprintf

Revision 1.94 / (download) - annotate - [select for diffs], Tue Aug 13 08:55:38 1996 UTC (16 years, 9 months ago) by explorer
Branch: MAIN
Changes since 1.93: +2 -2 lines
Diff to previous 1.93 (colored)

be quiet about read_subchannel.  Some CD players use this to poll, and having
a screen filled with kernel messages isn't nice.  Closes pr kern/817

Revision 1.93 / (download) - annotate - [select for diffs], Tue Aug 13 08:31:31 1996 UTC (16 years, 9 months ago) by explorer
Branch: MAIN
Changes since 1.92: +4 -2 lines
Diff to previous 1.92 (colored)

Fix condition where disk_unbusy may not get called

Revision 1.92 / (download) - annotate - [select for diffs], Sun May 5 19:52:50 1996 UTC (17 years ago) by christos
Branch: MAIN
Changes since 1.91: +3 -3 lines
Diff to previous 1.91 (colored)

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

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

remove include of <sys/cpu.h>

Revision 1.90 / (download) - annotate - [select for diffs], Sat Mar 30 21:44:50 1996 UTC (17 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.89: +2 -2 lines
Diff to previous 1.89 (colored)

Eliminate scsi_conf.h.

Revision 1.89 / (download) - annotate - [select for diffs], Fri Mar 29 14:50:12 1996 UTC (17 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.88: +1 -3 lines
Diff to previous 1.88 (colored)

eliminate unused variables.

Revision 1.88 / (download) - annotate - [select for diffs], Wed Mar 27 01:11:41 1996 UTC (17 years, 2 months ago) by cgd
Branch: MAIN
Changes since 1.87: +2 -2 lines
Diff to previous 1.87 (colored)

fix pasto: sdminphys -> cdminphys in comment.

Revision 1.87 / (download) - annotate - [select for diffs], Wed Mar 27 00:48:50 1996 UTC (17 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.86: +2 -2 lines
Diff to previous 1.86 (colored)

SDUNIT -> CDUNIT in last.

Revision 1.86 / (download) - annotate - [select for diffs], Tue Mar 26 22:22:19 1996 UTC (17 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.85: +5 -1 lines
Diff to previous 1.85 (colored)

Put back dk_establish() for now.

Revision 1.85 / (download) - annotate - [select for diffs], Tue Mar 26 20:32:06 1996 UTC (17 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.84: +39 -10 lines
Diff to previous 1.84 (colored)

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

Revision 1.84 / (download) - annotate - [select for diffs], Tue Mar 19 03:05:15 1996 UTC (17 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.83: +14 -35 lines
Diff to previous 1.83 (colored)

Define a full set of [234][bl]tol() and lto[234][bl]() conversion functions,
inlined.
Use sized types in protocol structures.
Make the definition of scsi_sense_data less ugly.

Revision 1.83 / (download) - annotate - [select for diffs], Sun Mar 17 00:59:41 1996 UTC (17 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.82: +15 -11 lines
Diff to previous 1.82 (colored)

New device attachment scheme:

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

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

Revision 1.82 / (download) - annotate - [select for diffs], Wed Feb 14 21:46:52 1996 UTC (17 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.81: +93 -67 lines
Diff to previous 1.81 (colored)

scsi prototypes

Revision 1.81 / (download) - annotate - [select for diffs], Tue Jan 30 18:28:02 1996 UTC (17 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.80: +6 -2 lines
Diff to previous 1.80 (colored)

Accept DIOCEJECT as a synonym for CDIOCEJECT.  Implement DIOCLOCK
separately from CDIOCALLOW and CDIOCPREVENT, even though they perform
basically the same function (with a different interface XXX).

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

Handle cases like the following:
	- controller calls scsi_done() with error XS_TIMEOUT
	- scsi_done() calls sddone()
	- sddone() calls disk_unbusy()
	- scsi_done() calls controller to retry command (missing the
	  call to disk_busy())
	- controller calls scsi_done()
	- scsi_done() calls sddone()
	- sddone() calls disk_busy(), which panics because of the imbalance.
Bug noticed by Leo Weppleman, who also suggested this fix; pass an additional
boolean argument ("complete") to the device's "done" routine, with a
value of `0' passed from the previous call to "done", and add an additional
call to "done" when the xfer resources are freed.

Revision 1.79 / (download) - annotate - [select for diffs], Sun Jan 7 22:03:58 1996 UTC (17 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.78: +41 -19 lines
Diff to previous 1.78 (colored)

New generic disk framework.  Highlights:

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

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

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

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

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

Revision 1.78 / (download) - annotate - [select for diffs], Thu Dec 7 19:11:32 1995 UTC (17 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.77: +39 -14 lines
Diff to previous 1.77 (colored)

In both cd.c and sd.c:
	If the read or write request can fit into a 6-byte cdb, then
	use a 6-byte cdb, otherwise use the 10-byte as before.

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

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

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

Revision 1.77 / (download) - annotate - [select for diffs], Sat Nov 11 20:07:57 1995 UTC (17 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.76: +2 -13 lines
Diff to previous 1.76 (colored)

Remove the gratuitous code to check for a disc at boot time.

Revision 1.76 / (download) - annotate - [select for diffs], Tue Oct 10 02:52:56 1995 UTC (17 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.75: +8 -1 lines
Diff to previous 1.75 (colored)

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

Revision 1.75 / (download) - annotate - [select for diffs], Tue Sep 26 19:26:48 1995 UTC (17 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.74: +1 -7 lines
Diff to previous 1.74 (colored)

Don't declare Debugger().  It's handled in <sys/systm.h>.
#include <sys/systm.h> where necessary, as suggested by Jonathan Stone.
Fixes PR #1511.

Revision 1.74 / (download) - annotate - [select for diffs], Sat Aug 12 21:36:46 1995 UTC (17 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.73: +3 -1 lines
Diff to previous 1.73 (colored)

Fix oversight in previous.

Revision 1.73 / (download) - annotate - [select for diffs], Sat Aug 12 20:31:42 1995 UTC (17 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.72: +24 -31 lines
Diff to previous 1.72 (colored)

minphys() functions really should return void.

Revision 1.72 / (download) - annotate - [select for diffs], Sat Aug 5 23:48:53 1995 UTC (17 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.71: +30 -27 lines
Diff to previous 1.71 (colored)

Use an intermediate variable to shorten label initialization code.

Revision 1.71 / (download) - annotate - [select for diffs], Mon Jul 24 06:55:37 1995 UTC (17 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.70: +3 -3 lines
Diff to previous 1.70 (colored)

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

Revision 1.70 / (download) - annotate - [select for diffs], Tue Jul 4 07:21:00 1995 UTC (17 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.69: +28 -19 lines
Diff to previous 1.69 (colored)

Make each disk and tape driver define its own read and write functions.
Deprecate rawread() and rawwrite() completely.  Remove d_strategy from cdevsw to
force the abstraction barrier.

Revision 1.69 / (download) - annotate - [select for diffs], Mon Jun 26 05:15:33 1995 UTC (17 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.68: +7 -3 lines
Diff to previous 1.68 (colored)

make dump stubs consistent

Revision 1.68 / (download) - annotate - [select for diffs], Wed May 3 19:38:45 1995 UTC (18 years ago) by mycroft
Branch: MAIN
Changes since 1.67: +10 -10 lines
Diff to previous 1.67 (colored)

Make the byte-shifting code consistent.

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

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

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

Add a missing unlock.

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

Revamp the locking mechanism slightly.

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

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

Revision 1.63 / (download) - annotate - [select for diffs], Thu Mar 23 12:13:37 1995 UTC (18 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.62: +2 -8 lines
Diff to previous 1.62 (colored)

Don't bother with DIOCWLABEL.

Revision 1.62 / (download) - annotate - [select for diffs], Thu Mar 23 12:11:07 1995 UTC (18 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.61: +7 -8 lines
Diff to previous 1.61 (colored)

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

Revision 1.61 / (download) - annotate - [select for diffs], Thu Mar 23 11:51:22 1995 UTC (18 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.60: +3 -15 lines
Diff to previous 1.60 (colored)

Revert cdsize() to do nothing.

Revision 1.60 / (download) - annotate - [select for diffs], Thu Mar 23 11:43:09 1995 UTC (18 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.59: +3 -4 lines
Diff to previous 1.59 (colored)

Rearrange DIOCWDINFO a little; closer to wd.c.

Revision 1.59 / (download) - annotate - [select for diffs], Thu Mar 23 11:37:51 1995 UTC (18 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.58: +2 -2 lines
Diff to previous 1.58 (colored)

Fix typo.

Revision 1.58 / (download) - annotate - [select for diffs], Thu Mar 23 11:33:18 1995 UTC (18 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.57: +80 -33 lines
Diff to previous 1.57 (colored)

Allow DIOCWDINFO even if label is not `writable'.

Revision 1.57 / (download) - annotate - [select for diffs], Tue Mar 7 21:46:06 1995 UTC (18 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

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

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

Finish last change.

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

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

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

Set the LoadEject bit when issuing a START.

Revision 1.53 / (download) - annotate - [select for diffs], Mon Jan 30 11:34:25 1995 UTC (18 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.52: +12 -10 lines
Diff to previous 1.52 (colored)

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

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

Update copyrights.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Jan 26 11:56:51 1995 UTC (18 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.50: +14 -18 lines
Diff to previous 1.50 (colored)

Redo the `wait for spin up' code.  The Mach 3 method clearly doesn't work.
Also, rearrange the first open sequences a bit; SDEV_OPEN is no longer magic.

Revision 1.50 / (download) - annotate - [select for diffs], Mon Jan 23 18:17:22 1995 UTC (18 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.49: +4 -4 lines
Diff to previous 1.49 (colored)

Do the PREVENT before the START.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Jan 16 21:31:34 1995 UTC (18 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.48: +1 -3 lines
Diff to previous 1.48 (colored)

Remove unused macros.

Revision 1.48 / (download) - annotate - [select for diffs], Fri Jan 13 10:51:14 1995 UTC (18 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.47: +7 -26 lines
Diff to previous 1.47 (colored)

Always boundary check I/O.

Revision 1.47 / (download) - annotate - [select for diffs], Wed Dec 28 19:42:47 1994 UTC (18 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.46: +96 -113 lines
Diff to previous 1.46 (colored)

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

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

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

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

Remove dkbad.h.

Revision 1.44 / (download) - annotate - [select for diffs], Wed Nov 23 07:55:25 1994 UTC (18 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.43: +8 -7 lines
Diff to previous 1.43 (colored)

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

Revision 1.43 / (download) - annotate - [select for diffs], Tue Nov 22 03:23:49 1994 UTC (18 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.42: +34 -33 lines
Diff to previous 1.42 (colored)

Add still more locking.

Revision 1.42 / (download) - annotate - [select for diffs], Mon Nov 21 10:39:09 1994 UTC (18 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.41: +7 -11 lines
Diff to previous 1.41 (colored)

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

Revision 1.41 / (download) - annotate - [select for diffs], Sun Nov 20 22:36:43 1994 UTC (18 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.40: +121 -88 lines
Diff to previous 1.40 (colored)

Add some missing locking, and some general cleanup.

Revision 1.40 / (download) - annotate - [select for diffs], Sun Oct 30 21:49:14 1994 UTC (18 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.39: +2 -2 lines
Diff to previous 1.39 (colored)

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

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

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

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

Fix minor omission.

Revision 1.37 / (download) - annotate - [select for diffs], Thu Oct 20 14:09:10 1994 UTC (18 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.36: +10 -10 lines
Diff to previous 1.36 (colored)

openpart -> openmask

Revision 1.36 / (download) - annotate - [select for diffs], Thu Oct 20 14:03:38 1994 UTC (18 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.35: +75 -70 lines
Diff to previous 1.35 (colored)

Similar changes to sd.c.

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

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

Revision 1.34 / (download) - annotate - [select for diffs], Thu Aug 11 23:51:26 1994 UTC (18 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.33: +29 -10 lines
Diff to previous 1.33 (colored)

On probe or open, retry the READ CAPACITY once if the drive reports NOT READY.

Revision 1.33 / (download) - annotate - [select for diffs], Fri Aug 5 22:56:49 1994 UTC (18 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

Fix spelling of `STEREO'.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Aug 4 09:52:47 1994 UTC (18 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.31: +12 -2 lines
Diff to previous 1.31 (colored)

Obey the command queue size for the controller.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Jul 4 20:39:46 1994 UTC (18 years, 10 months ago) by chopps
Branch: MAIN
Changes since 1.30: +5 -4 lines
Diff to previous 1.30 (colored)

change to support other MAXPARTITIONS vals aside from 8

Revision 1.30 / (download) - annotate - [select for diffs], Wed Jun 29 06:42:53 1994 UTC (18 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

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

Revision 1.29 / (download) - annotate - [select for diffs], Thu Jun 16 15:57:39 1994 UTC (18 years, 11 months ago) by chopps
Branch: MAIN
Changes since 1.28: +8 -9 lines
Diff to previous 1.28 (colored)

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

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

b_un.b_addr -> b_data

Revision 1.27 / (download) - annotate - [select for diffs], Wed May 11 09:53:52 1994 UTC (19 years ago) by mycroft
Branch: MAIN
Changes since 1.26: +11 -2 lines
Diff to previous 1.26 (colored)

Add dummy *dump() routines.

Revision 1.26 / (download) - annotate - [select for diffs], Mon May 9 07:40:47 1994 UTC (19 years ago) by chopps
Branch: MAIN
Changes since 1.25: +3 -1 lines
Diff to previous 1.25 (colored)

remove union's from sense_data struct, conditionaly define RAW_PART

Revision 1.25 / (download) - annotate - [select for diffs], Mon Apr 11 03:53:58 1994 UTC (19 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.24: +3 -9 lines
Diff to previous 1.24 (colored)

Fix various types.  Remove some outdated flags.

Revision 1.24 / (download) - annotate - [select for diffs], Mon Apr 11 02:23:41 1994 UTC (19 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.23: +5 -5 lines
Diff to previous 1.23 (colored)

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

Revision 1.23 / (download) - annotate - [select for diffs], Tue Mar 29 04:29:22 1994 UTC (19 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.22: +912 -1552 lines
Diff to previous 1.22 (colored)

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

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

Use b_actf, not av_forw.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Jan 11 17:21:57 1994 UTC (19 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

*strategy functions return void.

Revision 1.20 / (download) - annotate - [select for diffs], Thu Dec 23 09:35:51 1993 UTC (19 years, 5 months ago) by cgd
Branch: MAIN
Changes since 1.19: +9 -4 lines
Diff to previous 1.19 (colored)

fix from Nick Cuccia (cuccia@remarque.berkeley.edu), apparently
originating from Gary Grebus <glg@k8lt.ampr.org>: partition size
must be in units of DEV_BSIZE.

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

Canonicalize all #includes.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Aug 4 19:33:44 1993 UTC (19 years, 9 months ago) by brezak
Branch: MAIN
Changes since 1.17: +8 -8 lines
Diff to previous 1.17 (colored)

Normalize play_msf changes with 386bsd patch.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Aug 4 17:26:23 1993 UTC (19 years, 9 months ago) by brezak
Branch: MAIN
Changes since 1.16: +49 -1 lines
Diff to previous 1.16 (colored)

Add play_msf command and MSF variants. This is SCSI2 stuff and is needed for many flavors of player utilities.

Revision 1.16 / (download) - annotate - [select for diffs], Sun Aug 1 19:26:17 1993 UTC (19 years, 9 months ago) by mycroft
Branch: MAIN
Changes since 1.15: +4 -3 lines
Diff to previous 1.15 (colored)

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

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

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

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jun 27 07:01:17 1993 UTC (19 years, 11 months ago) by andrew
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)

ANSIfications.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Jun 17 12:18:29 1993 UTC (19 years, 11 months ago) by brezak
Branch: MAIN
Changes since 1.12: +4 -3 lines
Diff to previous 1.12 (colored)

Silence size complaint at probe.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Jun 16 04:31:37 1993 UTC (19 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

whoops. typo.

Revision 1.11 / (download) - annotate - [select for diffs], Wed Jun 16 03:39:30 1993 UTC (19 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.10: +3 -1 lines
Diff to previous 1.10 (colored)

fix to intuit the maximum number of scsi units available on a device
driver. this piece at least, should be safe from changing sizeof(dev_t)

Revision 1.10 / (download) - annotate - [select for diffs], Tue May 25 07:27:31 1993 UTC (20 years ago) by deraadt
Branch: MAIN
Changes since 1.9: +21 -21 lines
Diff to previous 1.9 (colored)

patch00149 by Julian Elischer <julian@jules.dialix.oz.au> & Rodney Grimes.
When an error was encountered, the sd/cd drivers printed blockno&ff0000
rather that blockno.

Revision 1.9 / (download) - annotate - [select for diffs], Thu May 20 22:48:57 1993 UTC (20 years ago) by deraadt
Branch: MAIN
Changes since 1.8: +1 -2 lines
Diff to previous 1.8 (colored)

First cut at cpu independent disklabels.
There will be niggly little details no doubt..

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

add rcsids and clean up file headers

Revision 1.7 / (download) - annotate - [select for diffs], Tue May 11 08:07:50 1993 UTC (20 years ago) by cgd
Branch: MAIN
Changes since 1.6: +1 -1 lines
Diff to previous 1.6 (colored)

fix stupid line transposition (from John Brezak <brezak@osf.org>)

Revision 1.6 / (download) - annotate - [select for diffs], Tue May 4 08:27:29 1993 UTC (20 years ago) by deraadt
Branch: MAIN
Changes since 1.5: +25 -19 lines
Diff to previous 1.5 (colored)

support for making dev->id_alive be set, this is for iostat to
find disk devices. wee bit of a kludge. sub-device attach()
routines must now return 1 for successful attach(), 0 otherwise.
Other bsd's do this too..

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

Display more meaningful message on SCSI `unit attention'.

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

fixed various bugs like cdattach() returning garbage.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Apr 12 08:19:28 1993 UTC (20 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.2: +102 -135 lines
Diff to previous 1.2 (colored)

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

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

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

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

after 0.2.2 "stable" patches applied

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




CVSweb <webmaster@jp.NetBSD.org>