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.
have to adjust for whether he have a "small" or "large" mode sense response.
sd_scsibus_getcache(), sd_scsibus_setache(): Set SMS_DBD so that we don't
have to deal with block descriptors here.
sd_scsibus_mode_sense(): Add a new parameter, "int *big", which tells the
caller whether it's a small or large header.
sd_scsibus_get_parms(), sd_scsibus_getcache(), sd_scsibus_setcache(): Use
the "big" value to find the data following the mode sense header correctly.
sd_scsibus_mode_sense(): Disable PQUIRK_NOBIGMODESENSE for now, as the
reasons for it were dubious and most likely fixed now.
sd_scsibus_get_parms(): Now that we're actually locating the right data,
check the returned page code to see if it's correct before using the mode
page info.
sd_scsibus_get_parms(): Get the rotational rate from the flex geometry page
too, if present.
XXX sd_scsibus_get_{opt,simplifiedparms}() need some work.
* Use the "block descriptor length" to find the beginning of the mode page
data. This is critical, since some devices do not return a block descriptor
at all. (XXX There is disgusting structure hackery here.)
* Always use scsipi_size() (i.e. READ CAPACITY) to get the total disk size.
* Get the rotational rate from the rigid geometry page.
* Don't read the block size from the block descriptor if there was none.
* Get the block size from the flexible geometry page if possible.
* If we don't like the way page 4 smells, try page 5, rather than just punting.
three PRs regarding them: 17836, 17837, 17838. Did a few kernel
compiles with them just to make sure they are okay. Approved by
christos@, thanks to Dave for sending the PRs and verifying to me
that they work.
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
fine at U2W, but barf at U160, with different controllers. Unfortunately
sometimes just being initialized at U160 does the trick, so setting them
to lower speed in the BIOS may also be needed.
rather than 10ths of ns. This is necessary in order to represent
Ultra320 SCSI.
* Add Ultra320 SCSI to the scsipi_syncparams[] table.
We're not going to bother bumping any version numbers with this change; only
the "hba" driver uses scsipi_sync_period_to_factor(), and the uses of
scsipi_sync_factor_to_period() are all internal to the scsipi code. Most
things just pass the factor around, which is unchanged by this.
Reviewed by Frank van der Linden.
This reveals some ugly points in the sd driver, as
the PQUIRK_ONLYBIG flag (there are 6, 10, 12 and 16 byte
CDBs for r/w) and the handling of small/big mode
select/sense. This should be cleaned up.
Also the "long" struct disk_parms.disksize is worth
a thought...
when trying to play audio CD's on some drives. The original message was :
> In my analysis, rev 1.19 of cd_scsi.c used cd_scsibus_set_mode()
> instead of scsipi_mode_select(). cd_scsibus_set_mode() had the code
> which clear a data.header.data_length, but scsipi_mode_select()
> does not have. So we need `data.header.data_length = 0;' before
> calling scsipi_mode_select().
Fixes PR 7299 and probably PR 15155 and PR 16883 too.
- 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.
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
"scsi_core". Make all the files previously selected by the "scsi"
attribute selected by the "scsi_core" attribute. Give the "scsibus"
device the "scsi_core" attribute.
- Use the plain words 'disk' and 'tape' instead of 'direct' and 'sequential'.
- Media status will be printed in the frontend, so don't bother with it.
- Don't bother printing the SCSI version, which is fixed these days, or the
numberic device type.
This eliminates problems where the underlying interrupt handler isn't the
specific layer calling scsipi_complete() for a given scsi transaction.
This avoids deadlocks where the kthread that called the autoconf routines
to configure a scsibus shouldn't be the one put to sleep waiting on a
scsipi_complete (only the scsibus's kthread should be doing that).
To avoid jitter this will force the scsibus's to probe in the order they
run through autoconf (so machines with multiple bus's don't move sd* devices
around on every reboot).
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.
One basic struct, a function to setup a queue with a specific strategy and
three macros to put buf's into the queue, get and remove the next buf or
get the next buf without removal.
The BUFQ_XXX interface will be removed in the future.
The B_ORDERED flag is not longer supported.
Approved by: Jason R. Thorpe <thorpej@wasabisystems.com>
XS_SELTIMEOUT and XS_TIMEOUT errors- but only do so if the device exists
already.
Devices that are being probed won't be found via periph_lookup, so we can
use that to find if a device exists for the purposes of honoring retries.
deal with such xfers, and can wedge the system with some controllers.
It's a bug to request such xfers for ATAPI, but as the request may come
from userland we have to protect against it.