Home | History | Annotate | Download | only in scsipi
History log of /src/sys/dev/scsipi/scsipi_disk.h
RevisionDateAuthorComments
 1.24  27-Feb-2025  jakllsch add more READ CAPACITY 16 data definitions
 1.23  04-Nov-2017  jdolecek fix comment - scsipi_rw_big was renamed to scsipi_rw_10 a while ago
 1.22  05-Apr-2017  jdolecek expose disk device FUA/DPO support via DIOCGCACHE, and allow the flags
to be set for I/O; implement support in sd(4) and nvme(4)

discussed on tech-kern
 1.21  25-Dec-2007  perry branches: 1.21.54; 1.21.74; 1.21.78; 1.21.82;
Convert many of the uses of __attribute__ to equivalent
__packed, __unused and __dead macros from cdefs.h
 1.20  01-Jul-2007  tsutsui branches: 1.20.8; 1.20.14; 1.20.16; 1.20.20;
Add __attribute__((__packed__)) to all command structures.
 1.19  01-Dec-2006  martin branches: 1.19.8; 1.19.10;
On Christos' request, reinstantiate the packed->__packed__ part of the
backed out change.
 1.18  01-Dec-2006  martin Back out align(4) for all struct decls - it breaks various things all
over the tree (for example esiop on sparc64 won't boot any more).
 1.17  30-Nov-2006  christos PR/34202: Dave Huang: Accessing cd device on alpha causes kernel trap

From the PR:
Since struct scsipi_read_discinfo_data is an odd number of bytes long
(35 bytes), ti ends up being unaligned. wdc_datain_pio() uses
bus_space_read_multi_4() to read the response from the drive, and
since ti is unaligned, it causes an unaligned access fault.

Add __aligned__(4) to all the structures.
 1.16  11-Dec-2005  christos branches: 1.16.20; 1.16.22;
merge ktrace-lwp.
 1.15  01-Feb-2005  reinoud branches: 1.15.6;
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.
 1.14  31-Jan-2005  reinoud 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.
 1.13  07-Dec-2004  thorpej branches: 1.13.2;
READ_CAPACITY -> READ_CAPACITY_10
 1.12  07-Dec-2004  thorpej USe more appropriate macro/struct names for READ/WRITE (6) and
READ/WRITE (10).
 1.11  04-Dec-2004  thorpej Use READ/WRITE (16) if the LBA is larger than 32 bits. Another bit
of kern/28514.
 1.10  03-Dec-2004  thorpej And thus spake SBC-3:

If the number of logical blocks exceeds the maximum value that is able to be
specified in the RETURNED LOGICAL BLOCK ADDRESS field, the device server
shall set the RETURNED LOGICAL BLOCK ADDRESS field to FFFFFFFFh. The
application client should then issue a READ CAPACITY (16) command (see 5.11)
to retrieve the READ CAPACITY (16) parameter data.

Implement this in scsipi_size().

First issue in kern/28514.
 1.9  17-Sep-2003  mycroft If READ CAPACITY fails, try a READ FORMAT CAPACITIES. Separate this into
another function, always doing a page 0 MODE SENSE to get the block
descriptor if we use READ CAPACITY, and use SMS_DBD on the page 4/5 MODE
SENSE. This does one extra command in some cases, but it separates and
simplifies the code a little.

Why do we prefer READ CAPACITY over READ FORMAT CAPACITIES? Two reasons:
1) It's much older and is much less likely to have had its command code
abused, and is thus "safer" to try first. 2) ALL of my USB flash readers
and pen drives screw up their capacity descriptors -- mostly off-by-one
errors in the size (they return the maximum LBA number instead, a la READ
CAPACITY, which has *never* been how READ FORMAT CAPACITIES was documented
in the MMC spec), and one returns the "no media" code on slots that have
media inserted (despite returning almost-correct data otherwise)!

F*** me with a chainsaw.
 1.8  06-Jan-2003  matt branches: 1.8.2;
Add multiple inclusion protection.
 1.7  19-Nov-2001  soren Remove duplicate struct scsipi_start_stop.
 1.6  02-Sep-2001  thorpej Add the Force Unit Access and Disable Page Out bits to the
READ(10) and WRITE(10) commands.
 1.5  13-Feb-1998  enami branches: 1.5.26; 1.5.28;
Backout previous change, and rather, remove all protection but the one
actually currently required. Suggested by Charles M. Hannum.
 1.4  13-Feb-1998  enami Fix or add protection for mutiple inclusion.
 1.3  01-Oct-1997  enami 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.
 1.2  27-Aug-1997  bouyer branches: 1.2.2;
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.
 1.1  01-Jul-1997  bouyer branches: 1.1.2;
file scsipi_disk.h was initially added on branch bouyer-scsipi.
 1.1.2.1  01-Jul-1997  bouyer New merged scsi/atapi code. Tested on i386 and sparc. Commiting to a branch
for now, so that it can be tested on other ports too.
The config sheme is as follow:
New merged scsi/atapi code. Tested on i386 and sparc. Commiting to a branch
for now, so that it can be tested on other ports too.
The config sheme is as follow:
scsibus at aha
sd at scsibus
cd at scsibus
atapibus at wdc
cd at atapibus
cd has bus-specific config and function front-end in scsicd.c and atapicd.c
The call to theses functions from cd.c is conditionned to
NSCSICD and NATAPICD (all defined in cd.h by config).
 1.2.2.3  14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.2.2.2  27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.2.2.1  27-Aug-1997  thorpej file scsipi_disk.h was added on branch marc-pcmcia on 1997-08-27 23:33:27 +0000
 1.5.28.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.28.1  13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.5.26.3  07-Jan-2003  thorpej Sync with HEAD.
 1.5.26.2  08-Jan-2002  nathanw Catch up to -current.
 1.5.26.1  21-Sep-2001  nathanw Catch up to -current.
 1.8.2.4  18-Dec-2004  skrll Sync with HEAD.
 1.8.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.8.2.1  03-Aug-2004  skrll Sync with HEAD
 1.13.2.1  29-Apr-2005  kent sync with -current
 1.15.6.3  21-Jan-2008  yamt sync with head
 1.15.6.2  03-Sep-2007  yamt sync with head.
 1.15.6.1  30-Dec-2006  yamt sync with head.
 1.16.22.1  10-Dec-2006  yamt sync with head.
 1.16.20.1  12-Jan-2007  ad Sync with head.
 1.19.10.1  11-Jul-2007  mjf Sync with head.
 1.19.8.1  15-Jul-2007  ad Sync with head.
 1.20.20.1  02-Jan-2008  bouyer Sync with HEAD
 1.20.16.1  26-Dec-2007  ad Sync with head.
 1.20.14.1  18-Feb-2008  mjf Sync with HEAD.
 1.20.8.1  09-Jan-2008  matt sync with HEAD
 1.21.82.1  21-Apr-2017  bouyer Sync with HEAD
 1.21.78.1  26-Apr-2017  pgoyette Sync with HEAD
 1.21.74.1  28-Aug-2017  skrll Sync with HEAD
 1.21.54.1  03-Dec-2017  jdolecek update from HEAD

RSS XML Feed