summaryrefslogtreecommitdiff
path: root/sys/scsi
AgeCommit message (Collapse)Author
2010-07-27Add scsi_cmd_rw_decode() for decoding any SCSI READ or WRITE command,Matthew Dempsky
and update atascsi(4) to make use of it. (Other HBAs will be updated post-release.) Should allow for use of SATA drives with >2^32 LBAs. ok deraadt@, dlg@, krw@
2010-07-27the queue entry and state variables in the xsh and ioh structs are partDavid Gwynne
of a separate struct which the ioh struct includes for no good reason anymore. just put the vars directly in the ioh. this removes this useless abstraction. ok krw@ matthew@
2010-07-25Missing SCSI_DATA_IN flag in dvd_read_copyright() causedKenneth R Westerback
confusion. Fixes at least my usb DVD reader and The Blue Tick.
2010-07-25Restore previous behaviour of always bzero()'ing the buf passed toKenneth R Westerback
scsi_inquire_vpd(). scsi_inquire_vpd() oddness noted by jsg@ after report of macppc problems by kili@.
2010-07-25Let DVD's play again. Logic reversal prevented copyright reading.Kenneth R Westerback
Symptoms noted by oga@. actual bug spotted by dlg@
2010-07-24Get rid of scsi_deinit(), and change scsi_init() back to a one-timeMatthew Dempsky
initialization strategy, rather than pretending to do user reference counting. Previously, we would re-initialize the SCSI pool(9)s, which had the fun consequence of causing sysctl(kern.pool.npools) to infinite loop at IPL_VM. ok krw@
2010-07-22Fix a few more scsi_scsi_cmd() removal regressions, caught byMatthew Dempsky
-Wuninitialized. Silly typo in my first diff noticed by oga@ and krw@; ok krw@
2010-07-22Mark two more DMA accessible malloc(9)s.Matthew Dempsky
2010-07-22In st_space() and st_write_filemarks(), if scsi_xs_get() returns NULL,Matthew Dempsky
set st->media_fileno and st->media_blkno before returning. Not sure if this is needed or even really correct, but it's an unintentional behavior change due to removing scsi_scsi_cmd(). ok dlg@
2010-07-22In scsi_inquire_vpd(), actually just return EJUSTRETURN when dealingMatthew Dempsky
with UMASS devices. Fixes scsi_scsi_cmd() removal regression. ok dlg@
2010-07-22style(9) fix and release rwlock(9) if scsi_xs_get() returns NULL,Matthew Dempsky
which should never happen anyway. Fixes scsi_scsi_cmd() removal regression. ok dlg@
2010-07-22In safte_match(), return 0 on SCSI errors, not an errno value. FixesMatthew Dempsky
regression from scsi_scsi_cmd() removal. ok dlg@
2010-07-22Appropriately set SCSI_DATA_IN or SCSI_DATA_OUT depending on type ofMatthew Dempsky
dvd_auth command. Fixes regression from scsi_scsi_cmd() removal. ok dlg@
2010-07-22Eliminate scsi_scsi_cmd() now that ss(4) is gone and with it theKenneth R Westerback
last bastardized sync and buf call through scsi_scsi_cmd(). Flatten code to call scsi_xs_sync() directly for all commands. Airplane typos shaken out by various. ok dlg@ matthew@ deraadt@
2010-07-21let mpath build again even though it is disabledTodd T. Fries
ok dlg@
2010-07-13Correct comment. scsi_sense_data is now 18 bytes, not 32.Kenneth R Westerback
2010-07-10Fixup structures to be correct sizeJordan Hargrave
ok claudio@
2010-07-10Limit SCIOCCOMMAND and ATAIOCCOMMAND requests to transferring MAXPHYSMatthew Dempsky
bytes worth of data. Also, pass M_CANFAIL to malloc(9) and handle allocation failures by returning ENOMEM. Prevents user space from causing a kernel panic by passing ridiculously large datalen values. ok dlg@, krw@
2010-07-08Move ss and friends to the attic.Kenneth R Westerback
Enthusiastic huzzahs from many. "A great day" dlg@
2010-07-07Pull out disk sort. I committed the wrong version of the diff and itMarco Peereboom
wasn't ok deraadt & dlg.
2010-07-06Enable FIFO IO for sd devices. This time committed against the actual tree.Marco Peereboom
Tested by lots of people during c2k10 ok phessler krw thib
2010-07-06Fix monumental cock-up with SCSI_SILENT and SCSI_IGNORE_ILLEGAL_REQUESTKenneth R Westerback
flags which I perpetrated when I paid insufficient attention to dlg@'s original diff. Belatedly tested by marco@ and myself. Bad marco@. Bad krw@. ok marco@
2010-07-03No more ss(4) or usscanner(4). Unused, unloved and unmaintained.Kenneth R Westerback
General huzzahs. "go for it" deraadt@
2010-07-03Get rid of EAGAIN, retry scsi_xs_sync() commands (after a scsi_delay())Kenneth R Westerback
that get XS_NO_CCB until retry limit exceeded. On to getting rid of XS_NO_CCB. ok matthew@ "so be it" dlg@
2010-07-03Stop disk on suspend and start it again upon resume. Gets rid of the loudMark Kettenis
click upon suspend that my laptop with ahci(4) has. ok dlg@, ok marco@ on an earlier iteration of this diff
2010-07-02Always try READ CAPACITY(16) on SCSI-3 devices. If it fails, returnKenneth R Westerback
the READ CAPACITY(10) values already retrieved. Creates the possibility to look at other interesting READ CAPACITY(16) data for future consideration. ok matthew@ marco@ deraadt@
2010-07-02ss(4) does not need the tape attribute; only tape devices do (and only on vax,Miod Vallat
really).
2010-07-02Use M_NOWAIT only if SCSI_NOSLEEP is set, as is the usual idiom. FromKenneth R Westerback
matthew@ who won't be home until late. ok matthew@ & tedu@.
2010-07-01Move rdcap/rdcap16 structs used to get info about disk size off ofKenneth R Westerback
stack and malloc/free them instead. First stirrings of the tide of de-stacking to come. Feedback, fixes and ok matthew@ & tedu@.
2010-07-01ioctl XS_SENSE/XS_SHORTSENSE should print the sense info likeKenneth R Westerback
everyone else when SCSIDEBUG is set.
2010-07-01Die struct scsi_device! Die! Instead, save a pointer to the routineKenneth R Westerback
to interpret sense errors. This is initialized to the basic interpretation routine, and specific scsi drivers (sd/st/cd) can replace this with their own. While here kill EJUSTRETURN dance and make more specialized interpretation routines directly call the basic routine if desired. Fixes by matthew@ to my first diff. Most original work by dlg@. ok matthew@ marco@ dlg@
2010-07-01Change scsibus(4)'s scsi_link array to an SLIST to save memory onMatthew Dempsky
sparsely populated buses. ok dlg@, krw@
2010-07-01Call malloc(9) with M_ZERO to prevent code paths from exposingMatthew Dempsky
uninitialized memory to user space or devices. ok deraadt@, dlg@
2010-07-01Restore setting xs->bp; fixes ncr(4) on VAX.Matthew Dempsky
ok miod@, krw@
2010-06-30for scsibus, silence the activate function when unknown events are given.Theo de Raadt
they are supposed to do, or be silent. ok mlarkin
2010-06-30Flush cache before suspend.Mark Kettenis
ok krw@, marco@
2010-06-30Bring cd(4) into line with sd(4) and st(4) by implementing CDF_DYINGKenneth R Westerback
to better handle detaching. ok deraadt@
2010-06-30Prune some dead assignments in st_interpret_sense(); st(4) alreadyMatthew Dempsky
always explicitly sets bp->b_resid before calling biodone(), so these are unneeded. ok krw@
2010-06-30switch ss over to using xshandlers for queuing io. this brings it into lineDavid Gwynne
with sd/cd/st. largely a mechanical change, untested due to a complete lack of hardware anywhere. ok krw@ matthew@
2010-06-29Shrink struct scsi_sense_data and thus the sense member of scsi_xfer,Kenneth R Westerback
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@
2010-06-29Change st(4) to use the FIFO buf sorting discipline rather than theMatthew Dempsky
default disk-sorting one. ok krw@
2010-06-28Remove all adapter-specific 'struct scsi_device's. They are never used. FirstKenneth R Westerback
step in elminating 'struct scsi_device' entirely. Spotted and initial diff from matthew@. ok matthew@ dlg@ deraadt@ marco@ miod@
2010-06-28remove a lonely remnant from some debug code that snuck in.David Gwynne
2010-06-28Move disk_attach() to the end of the attach functions, at which point theJoel Sing
disk is now ready to handle I/O. ok krw@ dlg@
2010-06-27"Believe it or not," nothing uses scsi_xfer's req_sense_length fieldMatthew Dempsky
in any meaningful way, so just get rid of it. ok krw@, dlg@
2010-06-26Don't #include <sys/user.h> into files that don't need the stuffPhilip Guenthe
it defines. In some cases, this means pulling in uvm.h or pcb.h instead, but most of the inclusions were just noise. Tested on alpha, amd64, armish, hppa, i386, macpcc, sgi, sparc64, and vax, mostly by krw and naddy. ok krw@
2010-06-26Not that anyone uses it, but bring ss(4) device referencing intoKenneth R Westerback
line with sd/cd/st.
2010-06-25move st over to using xshandlers for scheduling io. based on theDavid Gwynne
same changes in cd and sd. tested by and ok krw@
2010-06-24we cant rely on being able to sleep when dumping, so dont lose theDavid Gwynne
SCSI_NOSLEEP flag on the xs when setting extra flags by oring them in rather than assigning them. from matthew dempsky
2010-06-16Always check both the return value of scsi_do_mode_sense() and theKenneth R Westerback
NULL'ness of the pointer to the actual page data. Fixes a NULL deref when trying to set caching on my ASUS eeePC 1000HE's SD slot. ok dlg@