summaryrefslogtreecommitdiff
path: root/sys/dev/usb/umass.c
AgeCommit message (Collapse)Author
2006-06-23In a drivers activate() entry point, if on DVACT_DEACTIVATE it doesMiod Vallat
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@
2005-08-01Don't keep the devinfo string on the stack, instead use malloc/free.Brad Smith
This should cure some rare stack overflows. From augustss NetBSD ok dlg@ pascoe@
2005-05-24Set the data length on CBI data transfers.Christopher Pascoe
ok dlg@
2005-05-15Oops. atapiscsi.h is needed because that's where NATAPISCSI isKenneth R Westerback
defined. Fixes Y-E DATA USB Floppy Drive that otherwise complains about 'atapiscsi not configured'. Should fix PR #4204 from Ben Hooper.
2005-05-14Try to ensure that UFI/ATAPI USB umass devices always get the zeroKenneth R Westerback
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@.
2005-04-01Add support for polled umass/SCSI transactions. Should eliminate the panicsChristopher Pascoe
seen at reboot time after writing to umass devices. ok dlg@, testing markus@
2005-03-28Use USBD_DEFAULT_TIMEOUT on control transfers, rather than the SCSI requestChristopher Pascoe
timeout. ok dlg@
2005-03-28minor spelling corrections.Christopher Pascoe
ok dlg@
2004-07-21update the netbsd license and tagsDavid Gwynne
ok krw@
2004-07-21from netbsd, umass.c 1.103David Gwynne
Mostly stylistic change, making comments and printf()s similar between BBB and CBI. ok krw@
2004-07-21from netbsd, umass.c 1.105David Gwynne
do less work if we hit an error ok krw@
2004-07-21from netbsd, umass.c 1.112David Gwynne
Fix a printf() error. ok krw@
2004-07-21from netbsd, umass.c 1.116David Gwynne
When starting a bulk-only transfer, punt early if the device is going away. ok krw@
2004-07-21from netbsd, umass.c 1.104David Gwynne
Do the quirk initialization earlier. ok krw@
2004-07-21from netbsd, umass.c 1.101David Gwynne
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@
2004-07-21from netbsd, umass.c 1.100 1.113 1.115, umass_scsipi.c 1.11, umassvar.h 1.21David Gwynne
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@
2004-07-17from netbsd, umass.c 1.98, umassvar.h 1.20David Gwynne
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@
2004-07-15from netbsd via dlg, umass.c revision 1.97:Theo de Raadt
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.
2004-06-08Make umass CBI buffer handling consistant with BBB buffer handling byKenneth R Westerback
using sc->data_buffer (not sc->tranfer_data), in the actual data transfer operations. From NetBSD PR #25676. ok tdeval@ deraadt@
2003-11-07updated URLs from Jared Yanovich;Jason McIntyre
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.
2003-05-17sync with NetBSD and add various local hacks to make things work correctlyNathan Binkert
with our scsi layer
2003-05-07string cleanup; nate okTheo de Raadt
2003-04-27strcpy/sprintf cleanup of sys/dev. miod@, deraadt@ says to commit.Hakan Olsson
2003-01-05spellingTheo de Raadt
2002-12-15Fix/Cleanup some SCSI #defines.Kenneth R Westerback
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@
2002-10-12Remove more '\n's from panic() statements. Both trailing and leading.Kenneth R Westerback
Diff generated by Chris Kuethe.
2002-07-25get rid of trailing whitespaceNathan Binkert
2002-06-21Trial and error gives me this tweak for the trumpion 0x1100 device.Artur Grabowski
2002-05-07Meant to commit only ulpt and committed everything. Most things weren't readyNathan Binkert
2002-05-07Sync ulpt driver with NetBSDNathan Binkert
2002-03-14Final __P removal plus some cosmetic fixupsTodd C. Miller
2002-03-14First round of __P removal in sysTodd C. Miller
2001-09-25Change to umass to not attach immediately if the system is still 'cold'.Dale Rahn
Accessing the device via polling would cause a crash in the usb subsystem. this change delays the media configuration using startuphooks, when the system is fully up and running. This allows it to configure properly and on macppc it is possible to use a umass device as root device. Has little effect on other system, because they do not force USB configuration during 'cold'. Tested by myself and brad@.
2001-05-24Angelos' Fuji camera is an 8070i device and it only accepts 12 byte CDBs.Constantine Sapuntzakis
I'm going to guess that ATAPI and QIC157 devices also want 12-byte CDBs. So, pad CDBs to be 12 bytes for ATAPI, QIC157, 8070i (as well as UFI devices) Also, remove an overly paranoid check in BBB state machine which actually violates the spec. This is half of getting Angelos' Olympus camera to work. The other half involves a semi-violent rewrite of the sd scsi driver to make it more tolerant.
2001-02-24#else if/#elifMichael Shalayeff
2001-01-29Pull in updates from NetBSD 1.49. Mostly support for a couple moreConstantine Sapuntzakis
quirky devices.
2000-11-23fix lun support, not as nice as i would likeTheo de Raadt
2000-11-20limit luns on usbTheo de Raadt
2000-04-14Sync with NetBSD.Aaron Campbell
2000-04-08Y-E UFI drives don't clear sense on INQUIRY. Upper-layer SCSI driversConstantine Sapuntzakis
don't like that too much. Now drive is detected correctly, even without floppy in it.
2000-04-08Add RCSids.Aaron Campbell
2000-04-08Complete the port to OpenBSD started by aaron@Constantine Sapuntzakis
Tested with Y-E USB floppy.
2000-04-04New USB mass storage driver. Improvements: Uses asynchronous USB requests,Aaron Campbell
supports more transport protocols (bulk-only and CBI), supports more command sets (SCSI and ATAPI); from NetBSD. Not yet tested.
2000-03-31Add support for USB Mass Storage devices; e.g., USB Zip Drives. UNTESTED.Aaron Campbell
From NetBSD.