History log of /netbsd/sys/dev/usb/umass_scsipi.c (Results 1 – 25 of 70)
Revision Date Author Comments
# f2697634 31-Dec-2021 riastradh <riastradh@NetBSD.org>

umass(4): Omit needless reference counting.

autoconf never detaches before attach has completed, so there is no
longer any need for this mechanism.


# beecddb6 07-Aug-2021 thorpej <thorpej@NetBSD.org>

Merge thorpej-cfargs2.


# 96f1ac98 23-May-2021 riastradh <riastradh@NetBSD.org>

umass(4): Use an empty function callback, not null pointer.

This stupid bug, with an `XXX Broken!' comment right above, has been
preventing NetBSD from suspend/resume with a USB drive plugged in for

umass(4): Use an empty function callback, not null pointer.

This stupid bug, with an `XXX Broken!' comment right above, has been
preventing NetBSD from suspend/resume with a USB drive plugged in for
longer than I want to even think about admitting. *sigh*

show more ...


# 3bee0c11 24-Apr-2021 thorpej <thorpej@NetBSD.org>

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass a

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).

show more ...


# 4f8d1b77 14-Mar-2020 christos <christos@NetBSD.org>

revert the 0x% -> %# change for fixed width formats pointed out by uwe.


# c7337675 13-Mar-2020 christos <christos@NetBSD.org>

PR/55068: sc.dying: Fix printf formats:
- no %s/%p for kernel log
- 0x% -> %#
- always %j for kernel log


# e2ba2d90 19-Feb-2020 riastradh <riastradh@NetBSD.org>

C99 initializers for scsipi_bustype. No functional change intended.


# 70747dc1 10-Nov-2019 chs <chs@NetBSD.org>

in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.


# ea24c801 30-May-2019 mlelstv <mlelstv@NetBSD.org>

ATA passthrough commands, supported by many SPC-2 disks, require more
sense data.


# 33685ef0 28-Mar-2019 kardel <kardel@NetBSD.org>

Add reading of supported opcodes and their timeouts
at attachment time. Though this information is optional,
it allows to override our fixed timeouts with device
provided timeouts. These timeouts wil

Add reading of supported opcodes and their timeouts
at attachment time. Though this information is optional,
it allows to override our fixed timeouts with device
provided timeouts. These timeouts will override the
hardcoded values if the device provided timeouts
exceed the hardcoded values and are less than a day.

Using the device provided timeouts avoids premature
device resets and unreliable operation due to
inadequate timeouts.

Due to the limited implementations of USB
umass devices this feature is disabled for all
umass attached devices.

show more ...


# b1e3a2da 10-Feb-2019 jdolecek <jdolecek@NetBSD.org>

move the deallocation of the protocol-specific softc into its own detach hook,
so that calls to kmem_alloc() and kmem_free() would agree on the size

fixes panic on umass detach reported by Tom Ivar

move the deallocation of the protocol-specific softc into its own detach hook,
so that calls to kmem_alloc() and kmem_free() would agree on the size

fixes panic on umass detach reported by Tom Ivar Helbekkmo on current-users@

show more ...


# 325afd2b 07-Feb-2019 skrll <skrll@NetBSD.org>

Convert to kmem


# c965ca01 07-Feb-2019 skrll <skrll@NetBSD.org>

Remove (mostly useless) usb_detach_{broadcast,wait} and replace with
cv_{broadcast,timedwait}

Really should loop on conditon.


# 5e290e01 22-Jan-2019 skrll <skrll@NetBSD.org>

KNF


# f504d249 13-Nov-2018 mlelstv <mlelstv@NetBSD.org>

Handle abort paths gracefully on detach.


# d3118b63 28-Oct-2017 pgoyette <pgoyette@NetBSD.org>

Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...

(As proposed on tech-kern@ with additional changes and enhancements.)

Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...

(As proposed on tech-kern@ with additional changes and enhancements.)

Details of changes:

* All history arguments are now stored as uintmax_t values[1], both in
the kernel and in the structures used for exporting the history data
to userland via sysctl(9). This avoids problems on some architectures
where passing a 64-bit (or larger) value to printf(3) can cause it to
process the value as multiple arguments. (This can be particularly
problematic when printf()'s format string is not a literal, since in
that case the compiler cannot know how large each argument should be.)

* Update the data structures used for exporting kernel history data to
include a version number as well as the length of history arguments.

* All [2] existing users of kernhist(9) have had their format strings
updated. Each format specifier now includes an explicit length
modifier 'j' to refer to numeric values of the size of uintmax_t.

* All [2] existing users of kernhist(9) have had their format strings
updated to replace uses of "%p" with "%#jx", and the pointer
arguments are now cast to (uintptr_t) before being subsequently cast
to (uintmax_t). This is needed to avoid compiler warnings about
casting "pointer to integer of a different size."

* All [2] existing users of kernhist(9) have had instances of "%s" or
"%c" format strings replaced with numeric formats; several instances
of mis-match between format string and argument list have been fixed.

* vmstat(1) has been modified to handle the new size of arguments in the
history data as exported by sysctl(9).

* vmstat(1) now provides a warning message if the history requested with
the -u option does not exist (previously, this condition was silently
ignored, with only a single blank line being printed).

* vmstat(1) now checks the version and argument length included in the
data exported via sysctl(9) and exits if they do not match the values
with which vmstat was built.

* The kernhist(9) man-page has been updated to note the additional
requirements imposed on the format strings, along with several other
minor changes and enhancements.

[1] It would have been possible to use an explicit length (for example,
uint64_t) for the history arguments. But that would require another
"rototill" of all the users in the future when we add support for an
architecture that supports a larger size. Also, the printf(3) format
specifiers for explicitly-sized values, such as "%"PRIu64, are much
more verbose (and less aesthetically appealing, IMHO) than simply
using "%ju".

[2] I've tried very hard to find "all [the] existing users of kernhist(9)"
but it is possible that I've missed some of them. I would be glad to
update any stragglers that anyone identifies.

show more ...


# d05fddf4 21-Nov-2016 skrll <skrll@NetBSD.org>

No need to take the kernel lock in umass(4) anymore


# 91b8c7f0 03-Jul-2016 skrll <skrll@NetBSD.org>

Fix build for USB_DEBUG without UMASS_DEBUG


# f37a0a70 01-Jul-2016 skrll <skrll@NetBSD.org>

Convert umass(4) to usbhist.


# d591b4e8 02-May-2016 christos <christos@NetBSD.org>

move scsipi_strvis -> libkern:strnvisx()
change the prototype to match userland
fix sizes of strings passed to it


# 71112a2e 23-Apr-2016 skrll <skrll@NetBSD.org>

Merge nick-nhusb

- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debu

Merge nick-nhusb

- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
- kern/48308
- uhub status notification improvements
- umass(4) probe fix (applied to HEAD already)
- ohci(4) short transfer fix

show more ...


# 7a3db687 12-Sep-2014 skrll <skrll@NetBSD.org>

Improve USB debugging with USBHIST based on KERNHIST.

Convert some DPRINTFs to USBHIST_LOG and allow usbdebug, ehcidebug and
umassdebug to be changed via sysctl.

Remove the #define mess in usb.h.

Improve USB debugging with USBHIST based on KERNHIST.

Convert some DPRINTFs to USBHIST_LOG and allow usbdebug, ehcidebug and
umassdebug to be changed via sysctl.

Remove the #define mess in usb.h.

This was started by mrg@ and updated by reinoud@

show more ...


# fe89c19c 05-Jan-2013 christos <christos@NetBSD.org>

this used the wrong cpp variable for debugging so it does not need opt_usb.h
after all.


# 4decc1fb 05-Jan-2013 christos <christos@NetBSD.org>

- need opt_usb.h if depending on USB_DEBUG
- remove trailing whitespace
- add missing KERNEL_RCSID


# d674dff6 20-Aug-2012 drochner <drochner@NetBSD.org>

For devices which don't claim SPC-3, don't request 32 bytes of sense
data but just 18. Some devices signal an error if the transfer length
is not exactly what the device expects, and it is hard to de

For devices which don't claim SPC-3, don't request 32 bytes of sense
data but just 18. Some devices signal an error if the transfer length
is not exactly what the device expects, and it is hard to deal with
these errors afterwards.
This makes a number of USB memory sticks and SD card readers work
which were not usable before.

show more ...


123