summaryrefslogtreecommitdiffstats
path: root/sys/dev/isp
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup and document the implementation of firmware(9) based onluigi2007-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a version that i posted earlier on the -current mailing list, and subsequent feedback received. The core of the change is just in sys/firmware.h and kern/subr_firmware.c, while other files are just adaptation of the clients to the ABI change (const-ification of some parameters and hiding of internal info, so this is fully compatible at the binary level). In detail: - reduce the amount of information exported to clients in struct firmware, and constify the pointer; - internally, document and simplify the implementation of the various functions, and make sure error conditions are dealt with properly. The diffs are large, but the code is really straightforward now (i hope). Note also that there is a subtle issue with the implementation of firmware_register(): currently, as in the previous version, we just store a reference to the 'imagename' argument, but we should rather copy it because there is no guarantee that this is a static string. I realised this while testing this code, but i prefer to fix it in a later commit -- there is no regression with respect to the past. Note, too, that the version in RELENG_6 has various bugs including missing locks around the module release calls, mishandling of modules loaded by /boot/loader, and so on, so an MFC is absolutely necessary there. I was just postponing it until this cleanup to avoid doing things twice. MFC after: 1 week
* add a missing piece for 2432mjacob2007-02-101-0/+1
|
* Putative untested 2432 (PCI-E) support.mjacob2007-02-101-1/+12
|
* Clean up some of the various platform and release specific dma tagmjacob2007-01-233-47/+36
| | | | | | | stuff so it is centralized in isp_freebsd.h. Take out PCI posting flushed in qla2100/2200 register reads except for 2100s.
* Change the remainder of the drivers for DMA'ing devices enabled in themarius2007-01-211-2/+14
| | | | | | | | sparc64 GENERIC and the sound device drivers known working on sparc64 to use bus_get_dma_tag() to obtain the parent DMA tag so we can get rid of the sparc64_root_dma_tag kludge eventually. Except for ath(4), sk(4), stge(4) and ti(4) these changes are runtime tested (unless I booted up the wrong kernels again...).
* Grumble- let a linux-ism slip in and had an llx whichmjacob2007-01-201-9/+12
| | | | then choked on a 64 bit platforms. Oops.
* MFP4: Move default setting to the end of isp_reset instead of themjacob2007-01-207-93/+138
| | | | | | | | | | 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.
* RELENG_6 compilationmjacob2007-01-051-1/+1
|
* error print cleanup && turn off ints if RISC is pausedmjacob2007-01-051-1/+2
|
* Check the return from registering FC4 types with the fabric namemjacob2007-01-051-11/+24
| | | | | | | | | server. Don't complain about a hard loop id of 0xffff- we get this in point-to-point topologies with the 2300 and 2K Login firmware. Up the timeout on register FC4 types commands.
* Restore revision 1.126 that got accidentally nuked.mjacob2006-12-181-0/+6
|
* 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-173-25/+39
| | | | | | CHECKSUM fails. Oh well, but keep a couple of the changes. Avoid overflow in usec counters when waiting for mailbox completion.
* Implement ISP_RESET0 for PCI and SBUS attachments- isp_reset hasmjacob2006-12-163-8/+39
| | | | | been modified to call ISP_RESET0 if it fails to do a reset. This gives us a chance to disable interrupts.
* Remove dependency on ispfw and firmware as modules.mjacob2006-12-102-7/+2
| | | | | | | | | | | | | | | | | Either they're there early and the ispfw sets have registered themselves, or they're not. The module dependency stuff isn't quite what we want anyway. If the user doesn't want the load placed on system memory by loading the firmware, they don't specify it to be loaded (either by being linked in or via being a module to be loaded and then hooked in with firmware(9)). It doesn't then make sense to then override what they want by pulling it in anyway. This might be able to work if we were able to pull in just exactly what we needed for the card we have- but that's an optimization left for the future.
* clarify a comment slightlymjacob2006-12-091-1/+1
|
* 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-053-75/+88
| | | | | | 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.
* Add a chip timeout to ENABLE/MODIFY/DISABLE lun calls.mjacob2006-12-051-0/+1
| | | | MFC after: 1 month
* 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.
* Make the SAN login/logout stuff more common between different chipsetsmjacob2006-11-186-75/+175
| | | | | | and provied an isp_control entry point so that the outer layers can do PLOGI/LOGO explicitly. Add MS IOCB support. This completes the cycle for base support for SMI-S.
* Disable code to set max read byte count on the 2400.mjacob2006-11-171-0/+6
| | | | | | | It caused a panic in writing the config register on a system. Turn it off until we take the time to understand it. Reported by and Testing by: Anton
* Increase the timeout for some SAN commands.mjacob2006-11-163-11/+43
| | | | | | | | | Only complain about FC Reponse errors if they're nonzero. Shorten some PortID printouts for local loop. Add an internal isp_xcmd_t data structure which we'll use for some CT-Passthru support as part of adding SMI-S.
* minor change to reduce some diff noisemjacob2006-11-162-2/+3
|
* Push things closer to path failover by implementing loop down andmjacob2006-11-148-495/+940
| | | | | | | | | | | | | | | | | | | | | | | | | 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-0214-3346/+7601
|
* 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-262-1/+47
| | | | by providing OIDs for WWNN/WWPN and Initiator ID.
* Restore multi-version cleanliness.mjacob2006-09-031-3/+11
|
* add a newbus method for obtaining the bus's bus_dma_tag_t... This isjmg2006-09-031-2/+3
| | | | | | | | | | | | | required by arches like sparc64 (not yet implemented) and sun4v where there are seperate IOMMU's for each PCI bus... For all other arches, it will end up returning NULL, which makes it a no-op... Convert a few drivers (the ones we've been working w/ on sun4v) to the new convection... Eventually all drivers will need to replace the parent tag of NULL, w/ bus_get_dma_tag(dev), though dev is usually different for each driver, and will require hand inspection... Reviewed by: scottl (earlier version)
* More ispfwfunc definitions funnies which break pre-7.0 builds.mjacob2006-09-013-2/+4
|
* Add missing pre-7.0 firmware pointer. Oops.mjacob2006-09-011-0/+3
|
* fix bug in 2322 receive sequencer f/w loadmjacob2006-09-011-3/+3
|
* Fix RELENG_4 code version- isp_roles wasn't getting initialized somjacob2006-08-212-3/+6
| | | | | | | | | it ended up defaulting to ISP_ROLE_NONE. My testing hadn't caught it because I was deliberatly setting role via ioctl. Thanks to user Toni for lending me an alpha to test this on. MFC after: 0 days
* Fix 2KLOGIN code to specify *ibits* (not *obits*) so that themjacob2006-08-141-60/+77
| | | | | | | | | | | | | | | | | | | | | | | | | options field in register 10 will be deterministic, not random. Correct the number of input bits for EXECUTE_FIRMWARE 0..1 to 0..2- the 2322 and 24XX cards use mailbox register 2 to specify whether the f/w being executed is freshly loaded or not. Correct the number of input bits for {READ,WRITE}_RAM_WORD_EXTENDED so that register 8 gets picked up. Fix the indexing and offset for the 2322 f/w download so that it correctly puts the different code segments where they belong. Move VERIFY_CHECKSUM to be the 'else' clause to 2322 f/w downloads- the EXECUTE_FIRMWARE command for 2322 and 24XX cards will tell you if the f/w checksum is incorrect and VERIFY_CHECKSUM only works for RISC SRAM address < 64K so you can only do a VERIFY_CHECKSUM on the first of the 3 f/w segments for the 2322. Shorten the delay for the continuation mailbox commands- 1ms is ridiculous (100us is more likely). All of the more or less is really only for the 2322/6322 cards.
* The register offset is within 4K, not 256 bytes, for some QLogic cards.mjacob2006-08-141-1/+1
|
* The macro IS_23XX should not mistakenly include 24XX cards.mjacob2006-08-141-1/+2
|
* Remove reference to PTI cards. They haven't been functioningmjacob2006-08-051-15/+0
| | | | or around for probably at least 5 years.
* Increase local reserved (high && low) storage in each commandmjacob2006-08-041-1/+1
| | | | structure from 2 to 3 words.
* Fix na_fcentry_t to not have a lun field. Fix indentation in handlymjacob2006-08-043-37/+57
| | | | | | | | | the notify structs. Fix messages in isp_got_msg_fc to print out the loop id of the sender- not the wwpn which will be synthesized later, if possible, in the outer layers. Put in debug printouts to pair a notify ack to a notify so one can see the start/close of an immediate notify event. Put in spsace for TASK MANAGEMENT response flags (which we don't do yet).
* Initialize 2300 request/response pointers in isp_reset- not inmjacob2006-08-041-7/+4
| | | | isp_fibre_init.
* Rename ioctl driven task management functions so theymjacob2006-08-042-6/+10
| | | | | don't collide with task management definitions on other platforms.
* Some rearrangement of headers to minimize diffs with outside ofmjacob2006-07-166-64/+71
| | | | | | | | 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.
* Don't attach 2422's yet. It just confuses everyone.mjacob2006-07-141-0/+2
|
* Add some missing braces.mjacob2006-07-141-14/+30
| | | | | | Add MEMORY_BARRIER for the few scratch dma ops that were missing them plus add a couple of hi 32 bit dma ops (we could probably allow 64 bit scratch and request/response queue dma now).
* Put in some missing target mode for 2KLOGIN f/w spots.mjacob2006-07-101-10/+24
| | | | MFC after: 1 month
* 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-094-8/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* What the heck - make the last (most recent) 2200 f/w also domjacob2006-07-031-2/+6
| | | | Hard Loop acquisition.
OpenPOWER on IntegriCloud