Age | Commit message (Collapse) | Author |
|
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.
|
|
ok kettenis@ deraadt@ pedro@ miod@
|
|
is not useful. Check the value about to be subtracted.
Spotted by lint.
|
|
so we must start to use u_int; ok cloder
|
|
so we must start to use u_int; ok cloder
|
|
broken. Eliminate an unneeded variable and potential conversion issues
in SCIOCCOMMAND code before calling physio.
Similar to what NetBSD does.
Fixes cdda2wav vs "Billie Holiday - Songs for Distingue Lovers"
problem noted by Alexandre Ratchov. Tested by Alexandre.
ok marco@ pedro@ deraadt@ mickey@
|
|
|
|
ok dlg@
|
|
|
|
of panics and bugfixes. Access curproc directly, do not expect a process
pointer as an argument. Should fix many "process context required" bugs.
Incentive and okay millert@, okay marc@. Various testing, thanks.
|
|
|
|
spoofed sd disklabels. Sectors are the partition size units used and
documented everywhere else in the tree. sd ensures a sector will
always be a multiple of 512.
Fixes disklabel(8) error messages and partition size display for sd
devices that have no OpenBSD disklabel and a sectorsize > 512. Noted
by Robert Szasz on his Sony Hi-MD device.
ok pedro@ marco@
|
|
after being opened. Use SC_DEBUG() to suppress some verbiage during
spin up. Return actual errors encountered during attempt to spin up,
rather than always returning EIO.
ok dlg@
|
|
least one spec. Unlike other ATAPI devices.
Fixes PR #4611.
|
|
Fixes two second system 'freeze' when umass device plugged in. Speeds
up boot by not waiting for a minimum of 2 seconds at each scsi bus.
ok jmc@ pedro@ deraadt@
|
|
become ready. Make verbiage SC_DEBUG().
ok dlg@
|
|
multiple processes using it
|
|
process cant read from it while another one is fetching it from the scsi
device.
looks ok krw@
|
|
all the resources.
|
|
attach figures out that we cant do either of them, then free up all the
resources.
|
|
|
|
tested by deraadt@
|
|
|
|
|
|
reported and fixed by Michael Knudsen.
|
|
|
|
for a raw partition like we suppress errors for the other operations on raw
partitions. Replace 'could not get size' with more specific and informative
SC_DEBUG() output. Silences a usb card reader that fgsch@ found. Now attach
message is only 'sdX: drive offline'.
Tested & ok fgsch@
|
|
Makes the logic simpler by eliminating the XS_BUSY dance in xs->error,
and will allow individual device types to delay different lengths on
certain conditions.
Allow SCSI_NOSLEEP commands to be retried without waiting. Who knows,
they may work even without a delay.
ok marco@
|
|
abort it when a signal interrupts the tsleep().
Suggested by deraadt@.
"I really like this" deraadt@ "I like this" marco@
|
|
going to retry the command, pause for a second to let the condition
clear. Just as we do for certain NOT READY conditions.
Found with the help of, and fixes Ed Wandasiewicz's IBM USB Memory
key.
ok deraadt@
|
|
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.
|
|
functional change.
ok dlg@
|
|
fake a geometry. Page 4 info does not get used for size information.
Eliminate now unused union scsi_disk_pages.
ok marco@ mickey@ pre-lock.
|
|
headers; } to just union scsi_mode_sense_buf {}. No functional change.
ok marco@
|
|
Some blow up if buffer length is not 0. Just fake geometry for all
UMASS devices since it's almost always fictitious anyway. One step on
the road to eliminate geometry entirely.
Fixes Ed Wandasiewicz's 2nd gen iPod mini and Sebastiaan Indesteege's
UBest Technology device.
ok marco@
|
|
before free()'ing buf in sd_get_parms(). Tweak code so there is only
one free(buf, ...) to worry about.
ok deraadt@.
|