summaryrefslogtreecommitdiff
path: root/sys/scsi/sdvar.h
AgeCommit message (Collapse)Author
2007-11-06Fix SDF_DIRTY handling, eliminate useless SDF_FLUSHING. The sd_flush()Kenneth R Westerback
called from the last sdclose() on a device will now reset SDF_DIRTY after submitting the SYNCHRONIZE CACHE command. sddone() need not worry about SDF_DIRTY since it was never called for the SYNCHRONIZE CACHE command anyway. This eliminates a spurious SYNCHRONIZE CACHE command being issued for every sd device from sd_shutdown(). ok dlg@
2007-09-15Allow to pull out an usb stick with ffs filesystem while mountedAlexander Bluhm
and a file is written onto the stick. Without these fixes the machine panics or hangs. The usb fix calls the callback when the stick is pulled out to free the associated buffers. Otherwise we have busy buffers for ever and the automatic unmount will panic. The change in the scsi layer prevents passing down further dirty buffers to usb after the stick has been deactivated. In vfs the automatic unmount has moved from the function vgonel() to vop_generic_revoke(). Both are called when the sd device's vnode is removed. In vgonel() the VXLOCK is already held which can cause a deadlock. So call dounmount() earlier. ok krw@, I like this marco@, tested by ian@
2007-06-23Implement disk sizes > 2^32-1. Code modelled on NetBSD.Kenneth R Westerback
Tested, tweaked and ok otto@
2006-12-12Give the SCSI layer the ability to requeue i/o's rejected by a driverKenneth R Westerback
using the new NO_CCB result. Currently a no-op since no driver produces that result. ok dlg@ marco@ deraadt@
2006-03-05Remove NetBSDism NRND. Pointed out by Mickey.Kenneth R Westerback
ok miod@ marco@
2005-07-05Since scsi_link now includes a copy of the INQUIRY data, don't keep aKenneth R Westerback
copy of the vendor/product/revision fields in sd_softc. Just use the INQUIRY data to build the disklabel 'label' when required. No functional change.
2005-07-02Remove unused cd_softc.name field. Use the saved INQUIRY data inKenneth R Westerback
scsi_link to determine device type, rather than keeping a copy in sd_softc.type. Remove unused sd_softc.type field.
2005-07-02Remove unused struct sd_ops.Kenneth R Westerback
2005-07-02Don't use READ FORMAT CAPACITIES to determine the size of ATAPI sdKenneth R Westerback
devices. Use READ CAPACITY like NetBSD, FreeBSD, Linux and OpenSolaris do. Well, NetBSD keeps READ FORMAT CAPACITIES as a backup. Fixes problems with devices (such as my IBM USB Memory Key) which return block counts that are off by one for READ FORMAT CAPACITIES. This eliminates the significant difference between sd_atapi.c and sd_scsi.c so merge sd_scsi.c into sd.c and just be careful to mark ATAPI removable devices as both SDEV_NOSYNCCACHE and unable to return MODE SENSE page 4 info. All geometry faking is now in one place. Where it can be 'improved'. sd_scsi.c, sd_atapi.c and atapi_disk.h will be removed as a result.
2003-05-17paramters -> parameters in comment.Kenneth R Westerback
2002-03-14First round of __P removal in sysTodd C. Miller
2001-06-22KNFTheo de Raadt
1999-07-25Merge sd stuff from NetBSD-current. Helps with LS-120, ZIPConstantine Sapuntzakis
More SCSI logic from NetBSD-current Some tape fixes. ATAPI tapes do not work yet for most operations.