summaryrefslogtreecommitdiff
path: root/sys/dev/iscsi
AgeCommit message (Collapse)Author
2022-09-13kill_session now uses the session id to avoid stale session pointers.mlelstv
protect network socket with rwlock to handle recconnects. always take over socket from iscsid to prevent leaks. keep a good connection alive. don't forget child device when config_detach fails. fix locking when reassigning CCBs. pducount is protected by lock, no need for atomic. some code rework, refined debug messages.
2022-04-14Split some common stuff into scsi_subr module. This enables loadingpgoyette
of the iscsi module whether or not there are any scsi things built into the kernel. Addresses the iscsi portion of kern/56772
2022-03-31For device modules that provide both auto-config and /dev/xxxpgoyette
interfaces, make sure that initialization and destruction follow the proper sequence. This is triggered by the recent changes to the devsw stuff; per riastradh@ the required call sequence is: devsw_attach() config_init_component() or config_cf*_attach() ... config_fini_component() or config_cf*_detach() devsw_detach() While here, add a few missing calls to some of the detach routines. Testing of these changes has been limited to: 1. compile without build break 2. no related test failures from atf 3. modload/modunload work as well as before. No functional device testing done, since I don't have any of these devices. Let me know of any damage I might cause here! XXX Some of the modules affected by this commit are already XXX broken; see kern/56772. This commit does not break any additional modules (as far as I know).
2022-02-13iscsi(4): Fix config_found usage -- needs kernel lock.riastradh
Candidate fix for PR kern/56709.
2021-08-07Merge thorpej-cfargs2.thorpej
2021-06-06Provide missing file ops. Before a simple read() would panic the kernel.mlelstv
No longer fail close().
2021-06-06Schedule command timeout without connection lock being held to preventmlelstv
a deadlock.
2021-04-24Merge thorpej-cfargs branch:thorpej
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?).
2021-03-07Stop advertising more openings after limit is reached.mlelstv
2020-06-21avoid the use of UVM internals in the iscsi ioctl code.chs
copyin/out are fine in this context.
2020-05-26Catch up with the usage of struct vmspace::vm_refcntkamil
Use the dedicated reference counting routines. Change the type of struct vmspace::vm_refcnt and struct vm_map::ref_count to volatile. Remove the unnecessary vm->vm_map.misc_lock locking in process_domem(). Reviewed by <ad>
2020-05-13make the iscsi attached message aprint_verbose(), no need to show normallyjdolecek
2019-10-01in many device attach paths, allocate memory with KM_SLEEP instead of KM_NOSLEEPchs
and remove code to handle failures that can no longer happen.
2019-08-07Many years ago someone created a new __link_set_sysctl_funcs to holdpgoyette
the list of routines that need to be called for setting up sysctl variables. This worked great for all code included in the kernel itself, but didn't deal with modules that want to create their own sysctl data. So, we ended up with a lot of #ifdef _MODULE blocks so modules could explicitly call their setup functions when loaded as non-built-in modules. So today, we complete the task that was started so many years ago. When modules are loaded, after we've called xxx_modcmd(INIT...) we check if the module contains its own __link_set_sysctl_funcs, and if so we call the functions listed. We add a struct sysctllog member to the struct module so we can call sysctl_teardown() when the module gets unloaded. (The sequence of events ensures that the sysctl stuff doesn't get created until the rest of the module's init code does any required memory allocation.) So, no more need to explicitly call the sysctl setup routines when built as a loadable module.
2019-07-13register with pmf to allow suspend.mlelstv
2019-04-21wether -> whethermaya
2019-04-21Replace build option to enable hex encoded bignum parameters with a sysctl.mlelstv
2019-04-11Fix CVS Idkamil
NFCI
2019-04-01Fix typo in comment (s/numer/number/).msaitoh
2019-02-01fix FALLTRHOUGH spell-o.mrg
2018-12-07interlock isn't taken when cleaning up.mlelstv
2018-03-04Return temporary errors when the session is trying to recover the lastmlelstv
connection. The scsipi layer will retry.
2018-03-04Add sanity check.mlelstv
2017-12-06Fix typoozaki-r
2017-12-03- add a prefix to struct members (but not the ioctl ones because they affectchristos
the API) - use consistent variable names.
2017-12-03unreference session only for responses to SCSI commands.mlelstv
2017-12-03use same lock for ref/deref.mlelstv
2017-12-03add debug messagesmlelstv
2017-11-30add fo_name so we can identify the fileops in a simple way.christos
2017-06-24Fix session cleanup.mlelstv
2017-04-18Remove redundant duplicate assignment.maya
from clang static analyzer
2017-02-25Use correct lock for session wakeup.mlelstv
2017-02-05Destroy callouts when cleaning up.mlelstv
2016-12-25Lock correctly around CV calls.mlelstv
Fix handling of session termination. Enable MPSAFE processing for scsipi.
2016-06-15Work around an issue with MSG_WAITALL that would block for too long bymlelstv
replacing it with a receive loop.
2016-06-15Remove throttling code, instead signal scsipi layer to reduce the openingsmlelstv
and retry the command. Start with a small openings number and let scsipi request to grow it up to the current send window. Adjust ccb and pdu counts to avoid ressource shortages. These are still very ad-hoc numbers, but seem to be sufficient for a Gigabit link. Use separate condvar for PDU pool and add counter to help debugging. Revert setting PDU disposition to UNUSED before freeing. free_pdu uses this as a flag to detect already returned PDUs. Add reference counter for open commands to defer unmapping a session that would lead to crashes in scsipi. Move session cleanup to cleanup thread. Use get_sernum to retrieve current serial number where possible and make it check for immediate commands itself. Adjust debug output.
2016-06-15drop unused debug helper routinemlelstv
2016-06-15Fix field name in response pdu.mlelstv
2016-06-05use correct comparison of serial numbersmlelstv
2016-06-05Don't resume throttled CCBs when connection is terminating, except formlelstv
those being actively waited for. Stop unthrottling when reaching MaxCmdSN again.
2016-06-05Handle freeing of PDU when referencing CCB is freed.mlelstv
2016-06-05More debug output. Dump pending CCBs when cleaning up.mlelstv
2016-06-05more debug outputmlelstv
2016-06-05acquire session lock when changing throttling queuemlelstv
2016-06-05wrong assertion.mlelstv
2016-06-05Need session mutex to read serial number.mlelstv
2016-06-05initialize before check.mlelstv
2016-06-05appease compilermlelstv
2016-06-05Add missing mutex_exit().mlelstv
2016-06-05ensure that timeout counter is cleared when ccb is (re-)used.mlelstv