Age | Commit message (Collapse) | Author |
|
|
|
extraneous #include <malloc.h>
|
|
|
|
cpu_disklabel can go away, since nothing anymore needs to use it; ok miod
|
|
|
|
|
|
need for special case code; ok krw
|
|
type of all variables to daddr64_t. this includes the APIs for XXsize()
and XXdump(), all range checks inside bio drivers, internal variables
for disklabel handling, and even uvm's swap offsets. re-read numerous
times by otto, miod, krw, thib to look for errors
|
|
to size. tested on almost all machines, double checked by miod and krw
next comes the type handling surrounding these values
|
|
readdisklabel(), since all readdisklabel()'s do that already.
ok deraadt@
|
|
this time!
|
|
number (wd.c), and the uses are to find the minimum minor to be
detached.
|
|
but differently named SD/CD ones. No change to .o files.
ok deraadt@ dlg@
|
|
and for the same reason of preparing for safer handling of users
yanking usb devices out. No functional change.
Copied from bluhm@'s change to sd.c.
|
|
|
|
by bluhm@ for sd. No change to cd.o.
|
|
|
|
commands via the DVD_LU_SEND_RPC_STATE and DVD_HOST_SEND_RPC_STATE
ioctls respectively.
Thus allowing any region protected DVDs mistakenly delivered by Santa
to the wrong region to be viewed on recalcitrant DVD drives (with the
aid of an appropriate utility like regionset).
No change to any current functions.
Found in my hackers@ folder from August.
From netbsd -> Kurt Miller -> jmc@.
|
|
using the new NO_CCB result. Currently a no-op since no driver produces
that result.
ok dlg@ marco@ deraadt@
|
|
confusing when trying to attach scsibus to a hba, since it is really meant
for attaching scsi devices to scsibus.
ok deraadt@ marco@
|
|
ok miod@, deraadt@
|
|
ok marco@, deraadt@
|
|
|
|
"becoming ready" - this is done in the exact same way that it
was done for tape in st.c. This commit adds a cd specific interpret_sense
routine to cd.c that will catch the becoming ready case and handle it.
This also removes the need to use crazy timeouts to catch this case.
ok krw@
|
|
floppies and cd's were removable, displaying that fact in disklabel
output was unlikely to help. And the display in disklabel was the only
use of D_REMOVABLE in the tree.
ok marco@
|
|
that specifies the version of SCSI being supported. Even the ANSI part
that we use is complex. 4 means 2, 5 means 3 and 6 means 4. Translate
and use the value correctly. Fixes SCSI5 and SCSI6 in dmesg. And
properly protects SCSI2 devices from getting SCSI3 commands.
"seems like an elegant solution to me" millert@ ok dlg@ marco@
|
|
bus. supporting these complicates the midlayer unnecessarily.
ok krw@
|
|
when PWR_RESUME occurs. The drives may have forgotten they were
locked.
Noted and original diff by Alexey Vatchenko.
"I agree with the intent." miod@ "Looks acceptable." deraadt@
|
|
|
|
|
|
|
|
zeroref() - just to be on the safe side, should we mess up our ref count.
|
|
cdminphys().
|
|
information in the TOC. The partition info is just overwritten or
rendered incomplete by readdisklabel().
Just examine the TOC to determine if the cd is audio only, i.e. it has
a valid TOC but no data tracks. In this case don't call
readdisklabel(). Much simpler code. No functional change for single
data track CD's like the install media.
ok pedro@.
|
|
1) Using cd_load_toc() instead of replicating code.
2) Using struct cd_toc and betoh32() like other parts of cd.c.
3) Restoring pre-Sept. 26 behaviour of trying to read usable disklabel
info if there is no TOC. i.e. avoid readdisklabel() only when it is an
audio-only CD. Stop abusing spoofonly.
Tested by mjc@
|
|
Add a check for ending_track < starting_track before calculating size
of TOC to read.
Tested by mjc@
|
|
bzero() all malloc'ed cd_toc structs because cd_read_toc() will only
zero as much as it is trying to read.
malloc M_TEMP memory instead of M_DEVBUF memory for the cd_toc
structs.
ok deraadt@
|
|
used.
|
|
Eliminate separate check/break from for() loop.
No functional change.
ok deraadt@
|
|
instead.
ok deraadt@
|
|
better readable. actually no binary change.
ok krw@
|
|
ok hshoexer@
|
|
sized allocation. Remove some dead code.
|
|
sd does. Prevents spurious label information from being seen on
devices that return NOT READY/UNABLE TO RECOVER TABLE-OF-CONTENTS
error (or other sense errors) for blank media. Burning cd's still
works.
ok marco@ dlg@ fgsch@ deraadt@
|
|
ILLEGAL REQUEST is correctly reported for blank media, as an
informative FreeBSD comment pointed out. Ensure the returned table of
contents is always initialized to zero. Call readdisklabel with
spoofonly = 1 when no data tracks are found.
Don't try to read the DOS label from the device if spoofonly is 1.
Only done for amd64 here. More archs to follow.
Eliminates scsi error messages when attempting to open a cd containing
blank media, as pointed out by Michael Coulter.
ok deraadt@
|
|
calculations. Same as sd.c r1.94.
|
|
fix devices not supporting TEST UNIT READY.
|
|
headers; } to just union scsi_mode_sense_buf {}. No functional change.
ok marco@
|
|
stack into malloc'd memory.
ok deraadt@
|
|
Create structures to eliminate 2048+4 magic number everywhere. Mostly
adapted from NetBSD.
tested by sturm@, beck@. ok beck@
|