summaryrefslogtreecommitdiffstats
path: root/sys/dev/twa
Commit message (Collapse)AuthorAgeFilesLines
* Fix a compile problem introduced with r212008 on 32bit:bz2010-09-041-1/+1
| | | | | | | Both deadline and current_time are time_seconds (+ utc_offset()) casted to unsigned long long. No need to cast to or print as pointers. MFC after: 4 days
* Drain watchdog callouts before detaching. This prevents a panic whiledelphij2010-08-301-0/+4
| | | | | | unloading the kernel module. Submitted by: Tom Cough
* Vendor update to version 3.80.06.003 to fix a panic with ZFS when underdelphij2010-08-3012-258/+384
| | | | | | | | | | | | heavy I/O load. Many thanks to LSI for continuing to support FreeBSD. PR: kern/149968 Submitted by: LSI (Tom Couch) Reported by: Kai Kockro <kkockro web de> Tested by: Kai Kockro, jpaetzel MFC after: 7 days
* Don't use pack() for structures that is used purely for software state.delphij2010-07-092-3/+3
| | | | | | | | Otherwise the resulting, unaligned mutex structure would trigger panic. Submitted by: Tom Cough <tom.couch lsi.com> Reported/Tested by: jhb MFC after: 3 days
* Remove an unused comment.delphij2010-06-171-1/+1
|
* Apply driver update from LSI. Many thanks to LSI for continuing todelphij2010-06-0913-470/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | support FreeBSD. 1) Timeout ioctl command timeouts. Do not reset the controller if ioctl command completed successfully. 2) Remove G66_WORKAROUND code (this bug never shipped). 3) Remove unnecessary interrupt lock (intr_lock). 4) Timeout firmware handshake for PChip reset (don't wait forever). 5) Handle interrupts inline. 6) Unmask command interrupt ONLY when adding a command to the pending queue. 7) Mask command interrupt ONLY after removing the last command from the pending queue. 8) Remove TW_OSLI_DEFERRED_INTR_USED code. 9) Replace controller "state" with separate data fields to avoid races: TW_CLI_CTLR_STATE_ACTIVE ctlr->active TW_CLI_CTLR_STATE_INTR_ENABLED ctlr->interrupts_enabled TW_CLI_CTLR_STATE_INTERNAL_REQ_BUSY ctlr->internal_req_busy TW_CLI_CTLR_STATE_GET_MORE_AENS ctlr->get_more_aens TW_CLI_CTLR_STATE_RESET_IN_PROGRESS ctlr->reset_in_progress TW_CLI_CTLR_STATE_RESET_PHASE1_IN_PROGRESS ctlr->reset_phase1_in_progress 10) Fix "req" leak in twa_action() when simq is frozen and req is NOT null. 11) Replace softc "state" with separate data fields to avoid races: TW_OSLI_CTLR_STATE_OPEN sc->open TW_OSLI_CTLR_STATE_SIMQ_FROZEN sc->simq_frozen 12) Fix reference to TW_OSLI_REQ_FLAGS_IN_PROGRESS in tw_osl_complete_passthru() 13) Use correct CAM status values. Change CAM_REQ_CMP_ERR to CAM_REQ_INVALID. Remove use of CAM_RELEASE_SIMQ for physical data addresses. 14) Do not freeze/ release the simq with non I/O commands. When it is appropriate to temporarily freeze the simq with an I/O command use: xpt_freeze_simq(sim, 1); ccb->ccb_h.status |= CAM_RELEASE_SIMQ; otherwise use: xpt_freeze_simq(sim, 1); xpt_release_simq(sim, 1); Submitted by: Tom Couch <tom.couch lsi.com> PR: kern/147695 MFC after: 3 days
* MFp4: Large set of CAM inprovements.mav2010-01-281-54/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Unify bus reset/probe sequence. Whenever bus attached at boot or later, CAM will automatically reset and scan it. It allows to remove duplicate code from many drivers. - Any bus, attached before CAM completed it's boot-time initialization, will equally join to the process, delaying boot if needed. - New kern.cam.boot_delay loader tunable should help controllers that are still unable to register their buses in time (such as slow USB/ PCCard/ CardBus devices), by adding one more event to wait on boot. - To allow synchronization between different CAM levels, concept of requests priorities was extended. Priorities now split between several "run levels". Device can be freezed at specified level, allowing higher priority requests to pass. For example, no payload requests allowed, until PMP driver enable port. ATA XPT negotiate transfer parameters, periph driver configure caching and so on. - Frozen requests are no more counted by request allocation scheduler. It fixes deadlocks, when frozen low priority payload requests occupying slots, required by higher levels to manage theit execution. - Two last changes were holding proper ATA reinitialization and error recovery implementation. Now it is done: SATA controllers and Port Multipliers now implement automatic hot-plug and should correctly recover from timeouts and bus resets. - Improve SCSI error recovery for devices on buses without automatic sense reporting, such as ATAPI or USB. For example, it allows CAM to wait, while CD drive loads disk, instead of immediately return error status. - Decapitalize diagnostic messages and make them more readable and sensible. - Teach PMP driver to limit maximum speed on fan-out ports. - Make boot wait for PMP scan completes, and make rescan more reliable. - Fix pass driver, to return CCB to user level in case of error. - Increase number of retries in cd driver, as device may return several UAs.
* Change the command argument to ioctl routines to u_long to avoidrdivacky2009-09-222-2/+2
| | | | | | | | truncating the command to 32bit on 64bit archs where int is 32bit (ie. amd64). Approved by: scottl Approved by: ed (mentor, implicit)
* We no longer need to use d_thread_t, migrate to struct thread *.imp2009-05-201-3/+3
|
* Use si_drv1 instead of dev2unit() in twe(4) and twa(4)ed2009-04-141-4/+2
| | | | Reviewed by: scottl
* Reenable 64-bit DMA for twa(4) controllers, but use a boundary of 4GB tojhb2009-03-233-7/+13
| | | | | | | | | prevent individual transactions from crossing a 4GB address boundary. Due to bus_size_t type limitations, the driver uses a 2GB boundary in PAE kernels. Reviewed by: scottl MFC after: 1 week
* Limit DMA memory to lower addressable 4GB, without this patch, wedelphij2008-10-061-4/+4
| | | | | | | | can reliably provoke data corruption on systems equipped with a plenty of memory during high load. Reported by: gnn via iXsystems MFC candidate: RELENG_7_1, RELENG_7
* Replace all calls to minor() with dev2unit().ed2008-09-271-2/+2
| | | | | | | | | | | | | | | 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
* Deferred interrupts don't work yet, disable them.scottl2007-10-121-0/+2
| | | | Submitted by: Manjunath Ranganathaiah
* Update to version 3.70.03.007 from the vendor. This adds support for newscottl2007-10-099-63/+89
| | | | | | | | | SAS-enabled cards. It also makes the driver MPSAFE, eliminating some problems that resulted from CAM becoming MPSAFE. Many thanks to 3Ware/AMCC for continuing to support FreeBSD. Submitted by: Manjunath Ranganathaiah Approved by: re
* Prepare for future integration between CAM and newbus. xpt_bus_registerscottl2007-06-171-1/+1
| | | | | | | 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.
* Minor update to version 3.70.03.007scottl2007-05-192-2/+2
|
* The version string scheme embeds the freebsd major release version,scottl2007-05-102-2/+2
| | | | | something that I wasn't aware of with the last import. Adjust the string accordingly for 7-CURRENT.
* Import version 3.60.03.006 of the TWA driver:scottl2007-05-0919-48797/+103
| | | | | | | | | | | | | | | | This patch does the following: - Remove un-necessary code that is not even compiling into the driver under TW_OSL_NON_DMA_MEM_ALLOC_PER_REQUEST defines. - Remove bundled firmware image and associated "files" entry for tw_cl_fwimg.c - Remove bundled firmware flashing routines. We now have tw_update userspace FreeBSD controller flash utility. - Fix driver crash on load due to shared interrupt. - Fix 2 lock leaks for Giant lock. - Fix CCB leak. - Add support for 9650SE controllers. Many thanks to 3Ware/AMCC for continuing to support FreeBSD.
* Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willscottl2007-04-151-1/+1
| | | | | | | | | | | 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.
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-13/+31
| | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
* Add MODULE_DEPENDS for cam, pci, mca, eisa and isa where needed.mjacob2006-12-111-0/+2
| | | | | | PR: 106543 Reviewed by: Adam Radford MFC after: 3 days
* 2nd and final commit that moves us to CAM_NEW_TRAN_CODEmjacob2006-11-021-7/+0
| | | | | | as the default. Reviewed by multitudes.
* The first of 3 major steps to move the CAM layer forward to usingmjacob2006-10-311-2/+24
| | | | | | | | | | | | | | | | | | | | | 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
* Use utc_offset() where applicable, and hide the internals of itphk2006-10-021-3/+1
| | | | as static variables.
* First part of a little cleanup in the calendar/timezone/RTC handling.phk2006-10-022-2/+2
| | | | | | Move relevant variables to <sys/clock.h> and fix #includes as necessary. Use libkern's much more time- & spamce-efficient BCD routines.
* Remove header pollution.scottl2006-04-301-1/+0
|
* twa corresponding to the 9.3.0.1 release on the 3ware website. This driver hasvkashyap2005-11-0816-22638/+44190
| | | | | support for the 9xxxSX controllers, along with the earlier 9xxxS series controllers.
* Normalize a significant number of kernel malloc type names:rwatson2005-10-311-1/+1
| | | | | | | | | | | | | | | | | | | - Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat. - Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters. - Disambiguate some collisions by adding subsystem prefixes to some memory types. - Generally prefer lower case to upper case. - If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases. Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names.
* Don't pollute the entire kernel build with -I$S/dev/twa.obrien2005-09-115-12/+12
|
* Acquire Giant before making some CAM calls that need Giant to be held.vkashyap2005-06-112-1/+5
|
* Make call to tw_cl_deferred_interrupt in twa_poll, not dependent on thevkashyap2005-04-291-2/+12
| | | | return value from tw_cl_interrupt.
* The latest release of the FreeBSD driver (twa) forvkashyap2005-04-1227-31878/+36425
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3ware's 9xxx series controllers. This corresponds to the 9.2 release (for FreeBSD 5.2.1) on the 3ware website. Highlights of this release are: 1. The driver has been re-architected to use a "Common Layer" (all tw_cl* files), which is a consolidation of all OS-independent parts of the driver. The FreeBSD OS specific portions of the driver go into an "OS Layer" (all tw_osl* files). This re-architecture is to achieve better maintainability, consistency of behavior across OS's, and better portability to new OS's (drivers for new OS's can be written by just adding an OS Layer that's specific to the OS, by complying to a "Common Layer Programming Interface" API. 2. The driver takes advantage of multiple processors. 3. The driver has a new firmware image bundled, the new features of which include Online Capacity Expansion and multi-lun support, among others. More details about 3ware's 9.2 release can be found here: http://www.3ware.com/download/Escalade9000Series/9.2/9.2_Release_Notes_Web.pdf Since the Common Layer is used across OS's, the FreeBSD specific include path for header files (/sys/dev/twa) is not part of the #include pre-processor directive in any of the source files. For being able to integrate twa into the kernel despite this, Makefile.<arch> has been changed to add the include path to CFLAGS. Reviewed by: scottl
* check copyin+copyout return values when processing TWA_IOCTL_GET_LOCKsam2005-03-271-4/+6
| | | | Noticed by: Coverity Prevent analysis tool
* Kill MAJOR_AUTOphk2005-03-171-2/+0
|
* Use the correct flags for bus_dma_tag_create().scottl2005-03-061-2/+2
|
* Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, returnimp2005-03-011-1/+1
| | | | | BUS_PROBE_LOW_PRIORITY in stead of ifdef for devices that xl and vx both support so that xl will snarf them on up.
* Bumped up the driver version, following recent changes.vkashyap2005-02-121-1/+1
|
* 1. Revert back to the way the older driver handled XPT_PATH_INQ. This seems tovkashyap2005-02-103-7/+7
| | | | | | | | | fix the problem with device discovery seen by some people. 2. Change to make 3ware CLI/3DM work on amd64. 3. Fix a potential problem that could cause the driver to do strlen(NULL) when using older firmware. Reviewed by:scottl
* Changes corresponding to the 9.1.5.2 release of twa on the 3ware website.vkashyap2005-01-058-19555/+22218
| | | | | | | | | | | | The main changes are: 1. Use of multiple bus dma tags. 2. Timing of CAM requests by the driver. 3, Firmware interface change relating to retrieving AEN's. 4. Removal of twa_intrhook. 5. Bundling of latest firmware with BBU capability. Reviewed by:re Approved by:re
* Changes to make twa work on amd64.vkashyap2004-08-182-2/+2
| | | | | Reviewed by:re Approved by:re
* Fix a typo that made the busdma tag have a 0 highaddr. This driver heavilyscottl2004-06-241-1/+1
| | | | abuses busdma in other ways, and those will likely be fixed another day.
* Do the dreaded s/dev_t/struct cdev */phk2004-06-162-5/+5
| | | | Bump __FreeBSD_version accordingly.
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Undid scottl's recent changes.vkashyap2004-05-173-2/+41
|
* Remove twa_intrhook prototype.scottl2004-05-151-1/+0
| | | | Submitted by: cperciva
* Set the cpi.hba_inquiry field to something useful.scottl2004-05-151-1/+1
|
* Remove the config_intrhook as it is not needed.scottl2004-05-152-39/+1
|
* Unbreak LINT on 64-bit platforms. Note that this code is not style(9)-des2004-04-023-5/+6
| | | | | | | compliant, but I'll leave that for someone else. Noticed by: tinderbox Pointy hat to: the usual suspects
* Initial check-in of the device driver for 3ware's 9000 seriesvkashyap2004-03-3010-0/+29268
PATA/SATA RAID controllers. This driver is a SIM under CAM, and so, behaves like a driver for a SCSI controller.
OpenPOWER on IntegriCloud