Home | History | Annotate | Download | only in boot
History log of /src/sys/arch/next68k/stand/boot/sd.c
RevisionDateAuthorComments
 1.17  12-Feb-2023  tsutsui Use common declarations and macros in proper headers.

Also fix inconsistent sdopen() and sdstrategy() args and
remove useless #if 0'ed out code.
No functional change.
 1.16  09-Feb-2023  tsutsui Disable DEBUG options properly.
 1.15  09-Feb-2023  tsutsui Request only 36 bytes for a response of INQUIRY command for legacy drives.

Some drives don't respond larger requested size for newer
SCSI3 devices and not all drivers can handle short xfers.
We should fix drivers to handle such short xfers properly,
but we need only SCSI device type here (and the 36 bytes are
enough even if we want vendor and product names on a bootloader).

The problem is reported from Andreas Grabher (a maintainer of NeXT
Computer Emulator)a on port-next68k@:
https://mail-index.netbsd.org/port-next68k/2023/02/thread1.html
 1.14  09-Feb-2023  tsutsui Avoid possible division by zero trap in error cases to make debug easier.
 1.13  04-Feb-2023  tsutsui Remove trailing spaces and TABs.
 1.12  29-Mar-2014  christos branches: 1.12.34; 1.12.60;
make this compile (missing header file)
 1.11  18-Mar-2009  cegger branches: 1.11.12; 1.11.22; 1.11.26;
bzero -> memset
 1.10  04-Aug-2006  mhitch branches: 1.10.62; 1.10.70; 1.10.76;
gcc4 fix: correct of couple of casting errors picked up by gcc4.
 1.9  25-Jan-2006  christos branches: 1.9.2; 1.9.6;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.8  11-Dec-2005  christos branches: 1.8.2;
merge ktrace-lwp.
 1.7  21-Feb-2005  thorpej branches: 1.7.4;
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.
 1.6  07-Dec-2004  thorpej branches: 1.6.2; 1.6.4;
READ_CAPACITY -> READ_CAPACITY_10
 1.5  07-Dec-2004  thorpej USe more appropriate macro/struct names for READ/WRITE (6) and
READ/WRITE (10).
 1.4  27-Oct-2003  cl move structs nextstep_disklabel/cpu_partition and appendant #defines
to sys/sys/bootblock.h
- rename to next68k_disklabel and next68k_partition
- use {u,}int{8,16,32}_t instead of char/short/int (suggested by D. Laight)
 1.3  11-Jul-2002  christos branches: 1.3.6;
Apply patches from Christian Limpach:

- NeXT label reading support
- SCSI dma fixes
- media support for if_xe.c

Some of these need more cleanup, but at least make SCSI support usable on
the NeXT.
 1.2  26-Mar-1999  dbj branches: 1.2.22; 1.2.26; 1.2.34;
tweaks to compile with egcs -Werror
minor changes to scsi driver register accesses.
 1.1  09-Jun-1998  dbj branches: 1.1.1;
Initial revision
 1.1.1.1  09-Jun-1998  dbj Initial import of NetBSD/next68k.
 1.2.34.1  16-Jul-2002  gehenna catch up with -current.
 1.2.26.1  01-Aug-2002  nathanw Catch up to -current.
 1.2.22.1  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.3.6.5  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.3.6.4  18-Dec-2004  skrll Sync with HEAD.
 1.3.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.3.6.1  03-Aug-2004  skrll Sync with HEAD
 1.6.4.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.6.2.1  29-Apr-2005  kent sync with -current
 1.7.4.2  30-Dec-2006  yamt sync with head.
 1.7.4.1  21-Jun-2006  yamt sync with head.
 1.8.2.1  01-Feb-2006  yamt sync with head.
 1.9.6.1  11-Aug-2006  yamt sync with head
 1.9.2.1  09-Sep-2006  rpaulo sync with head
 1.10.76.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.10.70.1  28-Apr-2009  skrll Sync with HEAD.
 1.10.62.1  04-May-2009  yamt sync with head.
 1.11.26.1  18-May-2014  rmind sync with head
 1.11.22.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.11.12.1  22-May-2014  yamt sync with head.

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

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.12.60.2  22-Feb-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #90):

sys/arch/next68k/stand/boot/en.c: revision 1.20
sys/arch/next68k/stand/boot/scsi.c: revision 1.13
sys/arch/next68k/stand/boot/scsi.c: revision 1.14
sys/arch/next68k/stand/boot/conf.c: revision 1.8
sys/arch/next68k/stand/boot/sd.c: revision 1.17
sys/arch/next68k/stand/boot/samachdep.h: revision 1.1
sys/arch/next68k/stand/boot/samachdep.h: revision 1.2
sys/arch/next68k/stand/boot/rtc.c: revision 1.8
sys/arch/next68k/stand/boot/machdep.c: revision 1.9
sys/arch/next68k/stand/boot/boot.c: revision 1.14
sys/arch/next68k/stand/boot/boot.c: revision 1.15
sys/arch/next68k/stand/boot/scsivar.h: revision 1.2
sys/arch/next68k/stand/boot/devopen.c: revision 1.8
sys/arch/next68k/stand/boot/version: revision 1.7

Use common declarations and macros in proper headers.

Also fix inconsistent sdopen() and sdstrategy() args and
remove useless #if 0'ed out code.
No functional change.

Replace DELAY() with one in hp300 bootloader and adjust cpuspeed counts.

Fix boot failure on my ancient Seagate ST52160N drive.
It looks some of such old drives can't respond to SCSI
test-unit-ready command without proper wait after SCSI bus reset.

Bump version again to denote a fix.

XXX we should re-evaluate cpuspeed counts for DELAY() in bootloaders
(where cache is disabled) on other m68k ports, hp300 and luna68k etc.

Actually bump version (missed in the previous commit).
 1.12.60.1  12-Feb-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #78):

sys/arch/next68k/stand/boot/scsi.c: revision 1.11
sys/arch/next68k/stand/boot/sd.c: revision 1.13
sys/arch/next68k/stand/boot/scsi.c: revision 1.12
sys/arch/next68k/stand/boot/sd.c: revision 1.14
sys/arch/next68k/stand/boot/sd.c: revision 1.15
sys/arch/next68k/stand/boot/sd.c: revision 1.16
sys/arch/next68k/stand/boot/rtc.c: revision 1.7
sys/arch/next68k/stand/boot/dmareg.h: revision 1.4
sys/arch/next68k/stand/boot/machdep.c: revision 1.8
sys/arch/next68k/stand/boot/srt0.s: revision 1.3
sys/arch/next68k/stand/boot/README: revision 1.2
sys/arch/next68k/stand/boot/devopen.c: revision 1.7
sys/arch/next68k/stand/boot/Makefile: revision 1.30
sys/arch/next68k/stand/boot/Makefile: revision 1.31
sys/arch/next68k/stand/boot/version: revision 1.5

Remove trailing spaces and TABs.

Make sure to specify volatile explicitly on DMA register accesses.

It looks booting from SCSI disks on next68k have been broken
since NetBSD 1.6 days, but now it works.

Avoid possible division by zero trap in error cases to make debug easier.

Request only 36 bytes for a response of INQUIRY command for legacy drives.
Some drives don't respond larger requested size for newer
SCSI3 devices and not all drivers can handle short xfers.
We should fix drivers to handle such short xfers properly,
but we need only SCSI device type here (and the 36 bytes are
enough even if we want vendor and product names on a bootloader).
The problem is reported from Andreas Grabher (a maintainer of NeXT
Computer Emulator) on port-next68k@:
https://mail-index.netbsd.org/port-next68k/2023/02/thread1.html

Disable DEBUG options properly.

Bump version to 1.6 to denote recent bootloader's >20 years old bug fixes.
 1.12.34.2  22-Feb-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #1600):

sys/arch/next68k/stand/boot/en.c: revision 1.20
sys/arch/next68k/stand/boot/scsi.c: revision 1.13
sys/arch/next68k/stand/boot/scsi.c: revision 1.14
sys/arch/next68k/stand/boot/conf.c: revision 1.8
sys/arch/next68k/stand/boot/sd.c: revision 1.17
sys/arch/next68k/stand/boot/samachdep.h: revision 1.1
sys/arch/next68k/stand/boot/samachdep.h: revision 1.2
sys/arch/next68k/stand/boot/rtc.c: revision 1.8
sys/arch/next68k/stand/boot/machdep.c: revision 1.9
sys/arch/next68k/stand/boot/boot.c: revision 1.14
sys/arch/next68k/stand/boot/boot.c: revision 1.15
sys/arch/next68k/stand/boot/scsivar.h: revision 1.2
sys/arch/next68k/stand/boot/devopen.c: revision 1.8
sys/arch/next68k/stand/boot/version: revision 1.7

Use common declarations and macros in proper headers.

Also fix inconsistent sdopen() and sdstrategy() args and
remove useless #if 0'ed out code.
No functional change.

Replace DELAY() with one in hp300 bootloader and adjust cpuspeed counts.

Fix boot failure on my ancient Seagate ST52160N drive.
It looks some of such old drives can't respond to SCSI
test-unit-ready command without proper wait after SCSI bus reset.

Bump version again to denote a fix.

XXX we should re-evaluate cpuspeed counts for DELAY() in bootloaders
(where cache is disabled) on other m68k ports, hp300 and luna68k etc.

Actually bump version (missed in the previous commit).
 1.12.34.1  12-Feb-2023  martin Pull up following revision(s) (requested by tsutsui in ticket #1591):

sys/arch/next68k/stand/boot/scsi.c: revision 1.11
sys/arch/next68k/stand/boot/sd.c: revision 1.13
sys/arch/next68k/stand/boot/scsi.c: revision 1.12
sys/arch/next68k/stand/boot/sd.c: revision 1.14
sys/arch/next68k/stand/boot/sd.c: revision 1.15
sys/arch/next68k/stand/boot/sd.c: revision 1.16
sys/arch/next68k/stand/boot/rtc.c: revision 1.7
sys/arch/next68k/stand/boot/dmareg.h: revision 1.4
sys/arch/next68k/stand/boot/machdep.c: revision 1.8
sys/arch/next68k/stand/boot/srt0.s: revision 1.3
sys/arch/next68k/stand/boot/README: revision 1.2
sys/arch/next68k/stand/boot/devopen.c: revision 1.7
sys/arch/next68k/stand/boot/Makefile: revision 1.30
sys/arch/next68k/stand/boot/Makefile: revision 1.31
sys/arch/next68k/stand/boot/version: revision 1.5

Remove trailing spaces and TABs.

Make sure to specify volatile explicitly on DMA register accesses.

It looks booting from SCSI disks on next68k have been broken
since NetBSD 1.6 days, but now it works.

Avoid possible division by zero trap in error cases to make debug easier.

Request only 36 bytes for a response of INQUIRY command for legacy drives.
Some drives don't respond larger requested size for newer
SCSI3 devices and not all drivers can handle short xfers.
We should fix drivers to handle such short xfers properly,
but we need only SCSI device type here (and the 36 bytes are
enough even if we want vendor and product names on a bootloader).
The problem is reported from Andreas Grabher (a maintainer of NeXT
Computer Emulator) on port-next68k@:
https://mail-index.netbsd.org/port-next68k/2023/02/thread1.html

Disable DEBUG options properly.

Bump version to 1.6 to denote recent bootloader's >20 years old bug fixes.

RSS XML Feed