History log of /openbsd/sys/scsi/scsi_all.h (Results 1 – 25 of 65)
Revision Date Author Comments
# e471ee1c 11-Jan-2022 jsg <jsg@openbsd.org>

spelling


# ac22ea16 08-Sep-2020 krw <krw@openbsd.org>

If SCSI_IGNORE_ILLEGAL_REQUEST is set no error is returned from scsi_xs_sync()
when the request is unsupported.

So check mode sense(6) and mode sense(10) results for valid headers before
passing the

If SCSI_IGNORE_ILLEGAL_REQUEST is set no error is returned from scsi_xs_sync()
when the request is unsupported.

So check mode sense(6) and mode sense(10) results for valid headers before
passing the results back.

Avoid overwriting any error that was returned.

ok jmatthew@

show more ...


# 65e0582e 05-Sep-2020 krw <krw@openbsd.org>

Rename SID_INQUIRY_HDR (a.k.a. 5) to more explicit SID_SCSI2_HDRLEN and use it
to replace various uses of '5' when calculating the amount of data in the
INQUIRY response. Matches up more naturally wi

Rename SID_INQUIRY_HDR (a.k.a. 5) to more explicit SID_SCSI2_HDRLEN and use it
to replace various uses of '5' when calculating the amount of data in the
INQUIRY response. Matches up more naturally with SID_SCSI2_ALEN.

Also use to fix SCSIDEBUG display of INQUIRY responses to show correct count of
bytes received/available.

show more ...


# ed09ea98 02-Sep-2020 krw <krw@openbsd.org>

Add #define SID_SCSI2_RESPONSE 0x2 to allow elimination of another bunch of
magic numbers. As the nearby comment says '< 2 is obsolete. >2 is reserved'. So
0x2 is just right.


# 85680492 25-Nov-2019 krw <krw@openbsd.org>

Move struct scsi_read_cap_data and struct scsi_read_cap_data_16 to
scsi_all.h.

Add scsi_read_cap_10() and scsi_read_cap_16() functions to
scsi_base.c, i.e. move logic to do actual READ_CAPACITY comm

Move struct scsi_read_cap_data and struct scsi_read_cap_data_16 to
scsi_all.h.

Add scsi_read_cap_10() and scsi_read_cap_16() functions to
scsi_base.c, i.e. move logic to do actual READ_CAPACITY commands out
of sd_read_cap() and sd_read_cap_16().

This will allow the READ_CAPACITY code to be reused by cd(4).

Return -1 for errors where the error code is just discarded, reducing
ENOMEM, ENXIO, EIO uses.

No intentional functional change.

show more ...


# dd0887e4 27-Sep-2019 krw <krw@openbsd.org>

Use consistent idiom/naming convention for the the #include
guards. Spelunkers using grep are easily confused.


# f2840357 21-Sep-2019 krw <krw@openbsd.org>

Expand scsi_inquiry_data to 96 bytes to include new fields. If the
device claims to have more than the 36 bytes of SCSI2 data, issue a
2nd INQUIRY (under SCSIDEBUG!) to get up to 96 bytes of data.

A

Expand scsi_inquiry_data to 96 bytes to include new fields. If the
device claims to have more than the 36 bytes of SCSI2 data, issue a
2nd INQUIRY (under SCSIDEBUG!) to get up to 96 bytes of data.

Add some length sanity checks to debug output. Print VPD data under
SCSIDEBUG.

show more ...


# 2acb7c00 18-Sep-2019 krw <krw@openbsd.org>

Update struct inquiry_data with latest flags and remove flags that we didn't use and
are now (SPC-4+) marked as "reserved" instead of just "obsolete". Whitespace tweaks
to line stuff up.

Mostly foll

Update struct inquiry_data with latest flags and remove flags that we didn't use and
are now (SPC-4+) marked as "reserved" instead of just "obsolete". Whitespace tweaks
to line stuff up.

Mostly following FreeBSD.

show more ...


# 173a6623 16-Sep-2019 krw <krw@openbsd.org>

Update list of device types with combination of FreeBSD and
SPC-5. Add/Fix comments.


# bc9adaf2 27-Aug-2019 krw <krw@openbsd.org>

Refactor probing logic to mirror detach logic. i.e. put smarts in
scsi_probe() and make scsi_probe_bus(), scsi_probe_target() and
scsi_probe_lun() simple wrappers around scsi_probe().

Abstract the d

Refactor probing logic to mirror detach logic. i.e. put smarts in
scsi_probe() and make scsi_probe_bus(), scsi_probe_target() and
scsi_probe_lun() simple wrappers around scsi_probe().

Abstract the determination of which luns to probe into a separate
function. Thus eliminating the need to remove/add lun 0 link while
probing devices modern enough to support REPORTLUNS. Which means the
lun 0 link is no longer in different positions in the scsi_link list
for such devices compared to older devices which are blindly probed
until an invalid LUN is encountered.

show more ...


# 98c7175c 07-Jun-2015 krw <krw@openbsd.org>

More damned eye searing whitespace.


# 9e1b31bb 06-Jun-2013 krw <krw@openbsd.org>

Fix EOM handling. Makes Bacula much happier by allowing the use of
both 'Fast Forward Space File = yes' and 'Hardware End of Medium = yes'.

Mostly taken from FreeBSD.

Constant prodding by robert@,

Fix EOM handling. Makes Bacula much happier by allowing the use of
both 'Fast Forward Space File = yes' and 'Hardware End of Medium = yes'.

Mostly taken from FreeBSD.

Constant prodding by robert@, testing actual backup and restore by
ajacoutot@.

show more ...


# 3449afb2 08-Jul-2011 dlg <dlg@openbsd.org>

describe the ata vpd page


# 427418b6 24-Dec-2010 krw <krw@openbsd.org>

Have sd(4) devices check for and respect read-only information the
way st(4) does. Have both decline to open read-only devices for
anything but read-only access.

Suggestion to fail opens rather than

Have sd(4) devices check for and respect read-only information the
way st(4) does. Have both decline to open read-only devices for
anything but read-only access.

Suggestion to fail opens rather than individual i/o's from deraadt@.

Problem USB device found and donated by chefren, who also tested
diffs. Thanks!

ok dlg@ marco@

show more ...


# c6c609d5 02-Sep-2010 dlg <dlg@openbsd.org>

the page_length field in the vpd page header is 2 bytes, not 1.

ok krw@ marco@ matthew@


# f0e1c144 01-Sep-2010 dlg <dlg@openbsd.org>

ata information vpd page id


# 84e1f8ff 29-Jun-2010 krw <krw@openbsd.org>

Shrink struct scsi_sense_data and thus the sense member of scsi_xfer,
to 18 bytes by removing the extra_bytes field. sbic.c was the only
consumer, and that was in a DEBUG message.

18 bytes is the mi

Shrink struct scsi_sense_data and thus the sense member of scsi_xfer,
to 18 bytes by removing the extra_bytes field. sbic.c was the only
consumer, and that was in a DEBUG message.

18 bytes is the minimum length mandated by the SCSI spec. Anything
more is vendor/device specific information.

This fixes a usb key that yuo@ had, and probably others.

Any device that decides to pay attention to extra sense data must
allocate its own space.

ok marco@ matthew@ miod@ yuo@

show more ...


# a3ef7ce1 23-Apr-2010 dlg <dlg@openbsd.org>

the SAT spec from t10.org defines messages for tunnelling ATA commands over
SCSI when you're talking to a scsi to ata translation layer (satl). this
implements the ata command ioctl handler in scsi_i

the SAT spec from t10.org defines messages for tunnelling ATA commands over
SCSI when you're talking to a scsi to ata translation layer (satl). this
implements the ata command ioctl handler in scsi_ioctl.c that wraps the
ata command requests up in these scsi commands and then issues them against
the hardware. this cuts atascsi over to interpreting these scsi commands
rather than the ioctls directly.

this should allow mpi users (with a relatively recent firmware) to use
atactl against their SATA disks. i cant test cos my mpi(4) parts are too
old to either support these scsi commands or too old to take recent
firmwares.

ok marco@ @krw tested by krw@ and me on ahci/atascsi

show more ...


# 26d2dbbd 12-Oct-2009 dlg <dlg@openbsd.org>

mask bits correctly in devid vpd for the PI


# 31a2fbc4 02-Jun-2008 krw <krw@openbsd.org>

Shrink scsi_mode_sense_buf to 254 bytes so ahci doesn't get upset at
trying to dma-map odd length data areas. No other alignment should be
required according to miod@. Makes my new SATA tape drive wo

Shrink scsi_mode_sense_buf to 254 bytes so ahci doesn't get upset at
trying to dma-map odd length data areas. No other alignment should be
required according to miod@. Makes my new SATA tape drive work.

ok deraadt@

show more ...


# 95acbd04 10-Apr-2008 dlg <dlg@openbsd.org>

fix the macros that are used to read the devid vpd page.


# e82775ce 28-Dec-2007 dlg <dlg@openbsd.org>

massage the way vpds are defined. rename the page used for the devices
serial number and split the vpd header out for use in other places. while
here define the device identification page bits too.

massage the way vpds are defined. rename the page used for the devices
serial number and split the vpd header out for use in other places. while
here define the device identification page bits too.

ok krw@ marco@

show more ...


# 34365fb8 12-Apr-2007 weingart <weingart@openbsd.org>

The beginnings of support for 16-byte cdb's in the scsi code. This is
so we will be able to address devices larger than the 10-byte cdb's allow
us to do.

ok krw@, dlg@


# 88c242be 03-Apr-2007 dlg <dlg@openbsd.org>

define the vpd inquiry page code.


# 1e0da027 03-Apr-2007 dlg <dlg@openbsd.org>

modernise scsi_inquiry. the length field has grown and now theres pages to
query.

ok krw@


123