summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp/isp_freebsd.c
Commit message (Collapse)AuthorAgeFilesLines
* Replace all calls to minor() with dev2unit().ed2008-09-271-1/+1
| | | | | | | | | | | | | | | After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere. This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware. Reviewed by: kib
* Rename the kthread_xxx (e.g. kthread_create()) callsjulian2007-10-201-2/+2
| | | | | | | | | | | to kproc_xxx as they actually make whole processes. Thos makes way for us to add REAL kthread_create() and friends that actually make theads. it turns out that most of these calls actually end up being moved back to the thread version when it's added. but we need to make this cosmetic change first. I'd LOVE to do this rename in 7.0 so that we can eventually MFC the new kthread_xxx() calls.
* Export 4Gbps Fibre Channel link speed correctly with inquiry commands.jkim2007-08-231-9/+8
| | | | | Approved by: re (kensmith) MFC after: 3 days
* Get rid of a couple of Coverity found sign comparison errors.mjacob2007-07-101-3/+3
| | | | | Approved by: re (Ken) MFC after: 3 days
* Prepare for future integration between CAM and newbus. xpt_bus_registerscottl2007-06-171-2/+3
| | | | | | | now takes a device_t to be the parent of the bus that is being created. Most SIMs have been updated with a reasonable argument, but a few exceptions just pass NULL for now. This argument isn't used yet and the newbus integration likely won't be ready until after 7.0-RELEASE.
* Remove some ioctls that were ill-thought out. There is no usermjacob2007-06-111-105/+14
| | | | | | impact as no softwware using these ioctls was ever committed. Redo locking for ispioctl.
* Quiet GCC 4.2 warning.mjacob2007-06-081-1/+1
|
* Temp workaround for config_intrhook_establish running the hookmjacob2007-05-131-0/+3
| | | | right away.
* Make this an MP safe driver but also still be multi-release.mjacob2007-05-051-224/+185
| | | | | | | | Seems to work on RELENG_4 through -current and also on sparc64 now. There may still be some issues with the auto attach/detach code to sort out. MFC after: 3 days
* Revert a driver API change to xpt_alloc_ccb that isn't necessary. Fix ascottl2007-04-181-1/+1
| | | | couple of associated error checks.
* Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willscottl2007-04-151-3/+4
| | | | | | | | | | | use to synchornize and protect all data objects that are used for that SIM. Drivers that are not yet MPSAFE register Giant and operate as usual. RIght now, no drivers are MPSAFE, though a few will be changed in the coming week as this work settles down. The driver API has changed, so all CAM drivers will need to be recompiled. The userland API has not changed, so tools like camcontrol do not need to be recompiled.
* Temporarily desupport simultaneous target and initiator mode.mjacob2007-04-021-1/+9
| | | | | | | | | | | | | | | | | | | | | | | When the linux port changes were imported which split the target command list to be separate from the initiator command list and the handle format changed to encode a type in the handle the implications to the function isp_handle_index (which only the NetBSD/OpenBSD/FreeBSD ports use) were overlooked. The fault is twofold: first, the index into the DMA maps in isp_pci is wrong because a target command handle with the type bit left in place caused a bad index (and panic) into dma map. Secondly, the assumption of the array of DMA maps in either PCS or SBUS attachment structures is that there is a linear mapping between handle index and DMA map index. This can no longer be true if there are overlapping index spaces for initiator mode and target mode commands. These changes bandaid around the problem by forcing us to not have simultaneous dual roles and doing the appropriate masking to make sure things are indexed correctly. A longer term fix is being devloped.
* Fix compilation issues found in RELENG_4 port and merge themjacob2007-03-121-4/+3
| | | | diffs back to -current to keep versions identical.
* Fix some stupid copyright mistakes that have been there for quite some time.mjacob2007-03-101-1/+0
|
* Use the new xpt_rescan function to truly now have dynamicmjacob2007-02-231-11/+34
| | | | | | | | | | attachment of new devices that arrive (and we notice them via async Fibre Channel events). We've always had the right thing (of sorts) happen when devices go away- this is the corollary function that makes multipath failover actually work. MFC after: 2 weeks
* MFP4: Move default setting to the end of isp_reset instead of themjacob2007-01-201-3/+4
| | | | | | | | | | front of isp_init so we can read NVRAM even if we're role ISP_NONE. Prepare for reintroduction of channels (for FC) for N-Port Virtualization. Fix a botch in handle assignment that caused us to nuke one device when a new one arrives and end up with two devices with the same identity in the virtual target mapping table.
* Add back some CAM_NEW_TRAN code to make backporting to RELENG_6 easier.mjacob2006-12-181-2/+144
|
* Try an experiment with using DMA to load firmware into a 2200- VERIFYmjacob2006-12-171-23/+37
| | | | | | CHECKSUM fails. Oh well, but keep a couple of the changes. Avoid overflow in usec counters when waiting for mailbox completion.
* Find another spot where tagged command queueing gotmjacob2006-12-091-2/+7
| | | | accidentally nuked.
* Make ISPCTL_PLOGX find a handle to log into the management servermjacob2006-12-051-60/+44
| | | | | | with- not hope for the best. Change some things which were gated off of 24XX to be gated off of 2K login support. Convert some isp_prt calls to xpt_print calls.
* Fix XPT_GET_TRANSPORT_SETTINGS to zero validity and flags-mjacob2006-12-031-13/+24
| | | | | this was causing us to not negotiate sync at all, or at random.
* Push things closer to path failover by implementing loop down andmjacob2006-11-141-150/+529
| | | | | | | | | | | | | | | | | | | | | | | | | gone device timers and zombie state entries. There are tunables that can be used to select a number of parameters. loop_down_limit - how long to wait for loop to come back up before declaring all devices dead (default 300 seconds) gone_device_time- how long to wait for a device that has appeared to leave the loop or fabric to reappear (default 30 seconds) Internal tunables include (which should be externalized): quick_boot_time- how long to wait when booting for loop to come up change_is_bad- whether or not to accept devices with the same WWNN/WWPN that reappear at a different PortID as being the 'same' device. Keen students of some of the subtle issues here will ask how one can keep devices from being re-accepted at all (the answer is to set a gone_device_time to zero- that effectively would be the same thing).
* Add 4Gb (24XX) support and lay the foundation for a lot of new stuff.mjacob2006-11-021-237/+238
|
* 2nd and final commit that moves us to CAM_NEW_TRAN_CODEmjacob2006-11-021-138/+0
| | | | | | as the default. Reviewed by multitudes.
* The first of 3 major steps to move the CAM layer forward to usingmjacob2006-10-311-1/+0
| | | | | | | | | | | | | | | | | | | | | the CAM_NEW_TRAN_CODE that has been in the tree for some years now. This first step consists solely of adding to or correcting CAM_NEW_TRAN_CODE pieces in the kernel source tree such that a both a GENERIC (at least on i386) and a LINT build with CAM_NEW_TRAN_CODE as an option will compile correctly and run (at least with some the h/w I have). After a short settle time, the other pieces (making CAM_NEW_TRAN_CODE the default and updating libcam and camcontrol) will be brought in. This will be an incompatible change in that the size of structures related to XPT_PATH_INQ and XPT_{GET,SET}_TRAN_SETTINGS change in both size and content. However, basic system operation and basic system utilities work well enough with this change. Reviewed by: freebsd-scsi and specific stakeholders
* Begin the process of moving info to sysctl stuff for FreeBSDmjacob2006-09-261-1/+38
| | | | by providing OIDs for WWNN/WWPN and Initiator ID.
* Add missing pre-7.0 firmware pointer. Oops.mjacob2006-09-011-0/+3
|
* Rename ioctl driven task management functions so theymjacob2006-08-041-5/+5
| | | | | don't collide with task management definitions on other platforms.
* Some rearrangement of headers to minimize diffs with outside ofmjacob2006-07-161-2/+3
| | | | | | | | FreeBSD repository and to clean up the license header so as to not pollute the license with file function. Zero all mailbox structures prior to use (just in case). Change the outgoing mailbox count for INIT_FIRMWARE to be correct.
* Clean up the ioctl to not process nonsense on SCSI isp cards.mjacob2006-07-101-40/+44
| | | | MFC after: 1 month
* Convert isp(4) and ispfw(4) to use firmware(9) to manage firmwaremjacob2006-07-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loading for the QLogic cards. Because isp(4) exists before the root is mounted, it's not really possible for us to use the kernel's linker to load modules directly from disk- that's really too bad. However, the this is still a net win in in that the firmware has been split up on a per chip (and in some cases, functionality) basis, so the amount of stuff loaded *can* be substantially less than the 1.5MB of firmware images that ispfw now manages. That is, each specific f/w set is now also built as a module. For example, QLogic 2322 f/w is built as isp_2322.ko and Initiator/Target 1080 firmware is built as isp_1080_it.ko. For compatibility purposes (i.e., to perturb folks the least), we also still build all of the firmware as one ispfw.ko module. This allows us to let 'ispfw_LOAD' keep on working in existing loader.conf files. If you now want to strip this down to just the firmware for your h/w, you can then change loader.conf to load the f/w you specifically want. We also still allow for ispfw to be statically built (e.g., for PAE and sparc64). Future changes will look at f/w unloading and also role switching that then uses the kernel linker to load different ips f/w sets. MFC after: 2 months
* Don't set CAM_DEV_QFRZN when we get an ABORT_TASK. Justmjacob2006-05-301-1/+1
| | | | by itself, this makes no sense.
* Add missing case for RQSTYPE_CTIO3- neede for 64 bit target mode.mjacob2006-05-221-0/+1
|
* Remove bzero/bcopy vestiges.mjacob2006-05-221-7/+12
| | | | | Be cognizant as to whether we're running 2KLogin f/w in target mode and do the appropriate loopid load based upon that.
* Redo some code based upon issues found by Coverity.mjacob2006-04-211-17/+10
|
* Some more gratuitous format and name changes.mjacob2006-04-211-81/+157
| | | | | | | Pull in some target mode changes from a private branch. Pull in some more RELENG_4 compilation changes. A lot of lines changed, but not much content change yet.
* micro fix from justinmjacob2006-03-031-3/+3
|
* propagate role of device for ISP_GET_PDBINFOmjacob2006-02-261-0/+1
|
* a) clean up some declaration stuff (i.e., make more modern with respectmjacob2006-02-151-28/+28
| | | | | | | | | | | | | | | to getting rid u_int for uint and so on). b) Turn back on 64 bit DAC support. Cheeze it a bit in that we have two DMA callback functions- one when we have bus_addr_t > 4 bits in width and the other which should be normal. Even Cheezier in that we turn off setting up DMA maps to be BUS_SPACE_MAXADDR if we're in ISP_TARGET_MODE. More work on this in a week or so. c) Tested under amd64 and 1MB DFLTPHYS, sparc64, i386 (PAE, but insufficient memory to really test > 4GB). LINT check under amd64. MFC after: 1 month
* Remove use of inlines and use the functions as a library.mjacob2006-02-021-12/+12
| | | | | | | Larger code space, possibly performance hit, but more portable. Certainly less questionable use of inlining. Suggested by: des
* First of several commits as this driver is dusted off and maybe broughtmjacob2006-01-231-43/+15
| | | | | | | | | | | | | | | | | | up to date. Principle changes for this reelase is to support 2K Port Login firmware. This allows us to support the 2322 (and 2422 4Gb) cards which only come with the 2K Port Login firmware. The 2322 should now work- but we don't have firmware sets for it in ispfw (as the change to load 2K Port Login f/w hasn't been made- that f/w is so big it has to be loaded in more than one chunk). Other changes are the beginnings of cleaning up some long standing target mode issues. The next changes here will incorporate a lot of bug fixes from others. Finally, some copyright cleanup and attempts to make the parts of the driver that are FreeBSD specific start conforming more to FreeBSD style. MFC after: 1 month
* Add an ioctl framework for doing FC task management functions frommjacob2005-10-291-0/+59
| | | | a user space tool- useful for doing FC target mode certification.
* AT_MAKE_TAGID needs an instance as the 2nd arg- not just a 0.mjacob2005-07-311-1/+1
|
* Provide a needed argument to AT_MAKE_TAGID.scottl2005-01-231-1/+1
|
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-061-1/+1
|
* Until I can get a clearer architecture from PHK about why he wantsmjacob2004-08-231-0/+2
| | | | | | | the geometry code to grab a mutex that prohibits any driver on the stack below it from sleeping, it's not safe to allow anything in the top half of isp to sleep (excepting the thread that Fibre Channel instances use to re-scan loops/fabrics).
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-1/+1
| | | | Bump __FreeBSD_version accordingly.
* Store the target handles in a separate list from normal commands. Add anjl2004-05-241-5/+28
| | | | | | CTIO fast post routine to handle CTIO completions. Submitted by: mjacob
* Device megapatch 4/6:phk2004-02-211-0/+2
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Device megapatch 1/6:phk2004-02-211-2/+0
| | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number.
OpenPOWER on IntegriCloud