Age | Commit message (Collapse) | Author |
|
cleaning up some shutdown-hook related code on the way.
(A few drivers related to sparc are still skipped at kettenis' request)
ok kettenis mlarkin, tested by many others too
|
|
definitions instead. We don't change usb.h for now to stay compatible
with userland.
Tested by mpi@ on macppc and myself on i386.
ok mpi@
|
|
that's ever used it, and it's long since been changed to use
DVACT_{QUIESCE,SUSPEND,RESUME} instead.
ok deraadt@, dlg@; miod@ also agreed with this idea when I brought it
up a few weeks ago
|
|
ATAPI devices. atapiscsi(4) is only for handling ATAPI devices on an
ATA bus, so umass(4) shouldn't care about it.
ok krw@, dlg@; no objections from deraadt@
|
|
them from userland, and nothing in the kernel uses them.
ok krw@, miod@
|
|
This is needed for the addition of further suspend/resume actions.
Okay deraadt@, marco@.
|
|
initialized. From NetBSD. "won't hurt" miod@.
|
|
Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.
OK deraadt@
|
|
umass_disco() have a chance to free'em later.
from nathanw@netbsd. miod@ ok.
|
|
1) Not bail out of umass_attach() just because the max lun cannot be
found. Assume 0 and complete attachment.
2) Not expose sc->maxlun to possible misbehaving devices. Provide a
buffer and copy it into sc->maxlun only if the attempt to get the max
lun succeeds.
3) Shrink and simplify error handling and debug output.
Prompted by the recurrance of the problem reported in PR#5478. Code
taken for the most part from FreeBSD.
ok miod@
|
|
so that it shows up before the :. as a result, all the usb devices do not
need to have name printing code anymore. all this now works and prints
nicely because usbd_probe_and_attach() is serialized. ok kettenis
|
|
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@
|
|
USB_DECLARE_DRIVER macros.
No binary change.
ok dlg.
|
|
need it.
If a USB driver uses timeout(9) functions, the header file sys/timeout.h
must be included.
Tested by me (i386, macppc, sparc64), ckuethe (amd64), & todd (sparc, zaurus).
ok dlg.
|
|
No binary change.
ok dlg.
|
|
(This might look easy, but it was a big diff. Thanks to dlg and especially jsg
for looking over it; we found at least four mistakes in the initial diff.)
ok jsg.
|
|
and the address of it's argument: USBDEV(sc->sc_dev) yields &sc->sc_dev.
No binary changes.
ok jsg.
|
|
and it was not consistently used. It was confusing as it suggested these
functions were static, which they were not.
discussed with dlg and jsg, ok jsg.
|
|
binary change.
ok jsg
|
|
ok deraadt@ krw@ mbalmer@
|
|
something, then it MUST return zero on DVACT_ACTIVATE, not EOPNOTSUPP;
this very popular bug has been cut and pasted a lot of times...
ok deraadt@ mickey@
|
|
This should cure some rare stack overflows.
From augustss NetBSD
ok dlg@ pascoe@
|
|
ok dlg@
|
|
defined. Fixes Y-E DATA USB Floppy Drive that otherwise complains
about 'atapiscsi not configured'.
Should fix PR #4204 from Ben Hooper.
|
|
padded 12 byte commands mandated by the standard. Adapt the Linux data
length twiddling on certain commands. We used to have some of this in
a different form, curtesy of csapuntz@, but it got lost in subsequent
merges.
Fixes the USB card reader of Quentin Barnes who provided much testing
and feedback for over a year!
Tested by drahn@, ok marco@, 'this is good stuff' deraadt@.
|
|
seen at reboot time after writing to umass devices.
ok dlg@, testing markus@
|
|
timeout.
ok dlg@
|
|
ok dlg@
|
|
ok krw@
|
|
Mostly stylistic change, making comments and printf()s similar between BBB
and CBI.
ok krw@
|
|
do less work if we hit an error
ok krw@
|
|
Fix a printf() error.
ok krw@
|
|
When starting a bulk-only transfer, punt early if the device is going away.
ok krw@
|
|
Do the quirk initialization earlier.
ok krw@
|
|
On a Bulk-In data stall, make sure we copy back the data received, per the
spec. This is the real problem behind FORCE_SHORT_INQUIRY.
ok krw@
|
|
log message for umass 1.98, umass_scsipi.c 1.11, umassvar.h 1.21:
Fix several problems with CCI handling, and enable it: * We were never calling
the callback function when we got a UFI CCI(!). * We were passing a bogus
residual count on non-UFI CCIs. * After a REQUEST SENSE, the UFI CCI may
include the ASC/ASCQ from the sense information -- don't consider this a
failure.
In addition, remove a horrible hack that was causing us to drop sense
information on the floor and return empty INQUIRY responses, often in the
case where there is a UNIT ATTENTION pending during the INQUIRY. (Some drives
send the data and then fail, some don't.)
log message for umass.c 1.113:
Do not return STATUS_WIRE_FAILED in response to a CBI stall. This is perfectly
normal, and is used to report errors. Instead, use STATUS_CMD_FAILED, which
causes us to do a REQUEST SENSE. Should address PR 22960.
log message for umass.c 1.115:
Do not do a CBI reset before returning STATUS_CMD_FAILED. This causes any
sense information to be thrown away, and is therefore nonsensical.
ok krw@
|
|
log message:
Remove UMASS_QUIRK_NO_START_STOP and UMASS_QUIRK_NO_MAX_LUN.
We don't have UMASS_QUIRK_NO_START_STOP so I didn't have to remove it. I
consider umass_quirks.c to be too different so I hand removed references to
the removed defines. There are some useless entries in there now which will
be cleaned up after umass is merged with netbsd.
ok deraadt@
|
|
Well, this is bloody obscure...
My Imation USB FlashGO! adapter responds to a Get Max Lun request with a
stall. With uhci, this does the expected thing. With ohci, it was returning
a "data underrun" error because we weren't setting "buffer rounding" (i.e.
USBD_SHORT_XFER_OK), and the underrun was taking priority. This happened with
both the ohci in a Mac cube and the builtin ohci on the S3C2410.
So, set USBD_SHORT_XFER_OK on the Get Max Lun. Now I get a stall reported and
umass attaches correctly.
|
|
using sc->data_buffer (not sc->tranfer_data), in the actual data
transfer operations. From NetBSD PR #25676.
ok tdeval@ deraadt@
|
|
however, I did not apply the diff exactly. After hunting around I
found URLs for the missing files, and the ../index.html link appears
not to work. I replaced it with a more suitable link.
|
|
with our scsi layer
|
|
|
|
|
|
|
|
1) Correctly define MODE_SENSE_BIG as 0x5a, not 0x54.
2) Delete duplicate #define's of some opcodes in scsi_disk.h.
3) Delete multiple #define's for same opcode in scsi_disk.h.
4) Replace uses of deleted opcodes in umass.c with remaining ones.
ok millert@ tdeval@
|
|
Diff generated by Chris Kuethe.
|
|
|
|
|
|
|
|
|