summaryrefslogtreecommitdiffstats
path: root/sys/dev/asr
Commit message (Collapse)AuthorAgeFilesLines
* Garbage collect the asr driver. Hardware for it has not been produced inscottl2015-01-0215-11722/+0
| | | | | | | | | roughly 10 years, and the driver has not enjoyed any significant maintenance since long before that. Despite well-meaning efforts from a number of people, myself included, it never made the jump to 64-bit and was relegated to the back-corners of i386. Now its frailty is hampering forward progress with Clang. Any renewed engineering efforts are of course welcome and can happen outside of the tree. No MFC of this is planned.
* Fix build with asr driversmh2014-11-221-20/+19
| | | | | | | | | This was broken by r274819 as asr is not in GENERIC because its not 64bit safe. MFC after: 1 month X-MFC-With: r274819 Sponsored by: Multiplay
* Prevent overflow issues in timeout processingsmh2014-11-211-11/+9
| | | | | | | | | | | | | | | | | | | | | Previously, any timeout value for which (timeout * hz) will overflow the signed integer, will give weird results, since callout(9) routines will convert negative values of ticks to '1'. For unsigned integer overflow we will get sufficiently smaller timeout values than expected. Switch from callout_reset, which requires conversion to int based ticks to callout_reset_sbt to avoid this. Also correct isci to correctly resolve ccb timeout. This was based on the original work done by Eygene Ryabinkin <rea@freebsd.org> back in 5 Aug 2011 which used a macro to help avoid the overlow. Differential Revision: https://reviews.freebsd.org/D1157 Reviewed by: mav, davide MFC after: 1 month Sponsored by: Multiplay
* Adjust various SCSI drivers to handle either a 32-bit or 64-bit lun_id_t,nwhitehorn2013-10-301-2/+3
| | | | | | | mostly by adjustments to debugging printf() format specifiers. For high numbered LUNs, also switch to printing them in hex as per SAM-5. MFC after: 2 weeks
* Re-do r255853. Along with adding back the API/ABI changes from thescottl2013-09-251-9/+24
| | | | | | | | original, this hides the contents of cam_compat.h from ktrace/kdump/truss, avoiding problems there. There are no user-servicable parts in there, so no need for those tools to be groping around in there. Approved by: re
* Revert r255853 pending fixes to build errors in usr.bin/kdumpgjb2013-09-251-24/+9
| | | | Approved by: re (implicit)
* Update the CAM API for FreeBSD 10:scottl2013-09-241-9/+24
| | | | | | | | | | | | | | | | | | | | | | - Remove the timeout_ch field. It's been deprecated since FreeBSD 7.0; MPSAFE drivers should be managing their own timeout storage. The remaining non-MPSAFE drivers have been modified to also manage their own storage, and should be considered for updating to MPSAFE (or removal) during the FreeBSD 10.x lifecycle. - Add fields related to soft timeouts and quality of service, to be used in upcoming work. - Add room for more flags in the CCB header and path_inq structures. - Begin support for extended 64-bit LUNs. - Bump the CAM version number to 0x18, but add compat shims. Tested with camcontrol and smartctl. Reviewed by: nathanw, ken, kib Approved by: re Obtained from: Netflix
* Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCIscottl2013-08-121-3/+1
| | | | | | | | | | | | | | | | | command register. The lazy BAR allocation code in FreeBSD sometimes disables this bit when it detects a range conflict, and will re-enable it on demand when a driver allocates the BAR. Thus, the bit is no longer a reliable indication of capability, and should not be checked. This results in the elimination of a lot of code from drivers, and also gives the opportunity to simplify a lot of drivers to use a helper API to set the busmaster enable bit. This changes fixes some recent reports of disk controllers and their associated drives/enclosures disappearing during boot. Submitted by: jhb Reviewed by: jfv, marius, achadd, achim MFC after: 1 day
* Replace homegrown list implementation in sys/dev/asr/asr.c withdim2012-04-201-11/+11
| | | | | | | | STAILQ(). While here, fix another clang warning about a switch which tests an enum type for a regular integer value. Submitted by: jhb MFC after: 1 week
* Convert a number of drivers to obtaining their parent DMA tag from theirscottl2012-03-121-1/+1
| | | | PCI device attachment.
* Merge from r225950:marius2011-10-131-0/+14
| | | | | | Set the sense residual properly. Reviewed by: ken
* Fix typos - remove duplicate "the".brucec2011-02-211-1/+1
| | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
* Don't zero 'Info' after setting it up in the ASR_IOCTL_COMPAT case.brian2010-11-251-2/+2
| | | | MFC after: 2 days
* MFp4: Large set of CAM inprovements.mav2010-01-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* Unmark the ASR Compat IOCTLs as BURN_BRIDGES, per scottl@imp2009-05-091-2/+0
|
* 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
* 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.
* Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM willscottl2007-04-151-1/+2
| | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | 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 MFC after: 3 days
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-061-1/+2
| | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
* 2nd and final commit that moves us to CAM_NEW_TRAN_CODEmjacob2006-11-021-20/+0
| | | | | | as the default. Reviewed by multitudes.
* The first of 3 major steps to move the CAM layer forward to usingmjacob2006-10-311-4/+35
| | | | | | | | | | | | | | | | | | | | | 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
* Remove stale MAINTAINERmarkm2006-07-091-2/+0
| | | | OK'd by: scottl
* Remove various bits of conditional Alpha code and fixup a few comments.jhb2006-05-121-5/+0
|
* Give the asr softc list global a proper name.scottl2006-02-121-5/+5
|
* Squash a couple more invalid long casts.scottl2006-02-051-2/+2
|
* Squash another use of vtophys. Instead of creating separate busdma objectsscottl2006-02-041-39/+42
| | | | | for doing static memory transfers, start collecting them into a single object.
* Add the start of busdma infrastructure to this driver. Convert thescottl2006-02-041-10/+111
| | | | ASR_resetIOPR function to use it.
* Now that the U32 type is a really 32-bits wide, eliminate a bunch of otherscottl2006-02-041-7/+7
| | | | bad assumptions and long values.
* Give correct definitions to some basic types.scottl2006-02-041-2/+2
|
* Fix a possible memory leak in asr_attach.scottl2006-02-041-5/+12
|
* Don't allocate an asr_ccb in asr_attach, it hasn't been needed for years.scottl2006-01-141-9/+1
|
* Replace bogus code with real code.scottl2006-01-141-10/+4
|
* Rename driver_t variables. Use device_printf() instead of homerolled printf.scottl2006-01-141-39/+39
| | | | Use the provided softc instead of rolling our own.
* Fix -Wundef from compiling the amd64 LINT.ru2005-12-041-2/+2
|
* Only create the rdpti alias if the asr device creation succeeds.scottl2005-04-291-1/+2
|
* Make life easier on those trying to use the asr utilities by automaticallyscottl2005-04-011-0/+1
| | | | | | creating the /dev/dpti%d entry that the software expects. This is just a band-aid until either someone (hopefully) rewrites the utilities, or all asr/dpt cards in existance get blasted into the sun.
* Bring back some of the ioctl junk that was removed in rev 1.59 as acognet2005-03-171-2/+121
| | | | | | | i386-only kernel option, ASR_COMPAT, and under BURN_BRIDGES. It is really ugly, but raidutils depends on it. Discussed with: scottl
* Use BUS_PROBE_DEFAULT for pci probe return valueimp2005-03-051-1/+1
|
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-0614-14/+22
|
* - Set the CAM status to CAM_SCSI_STATUS_ERROR rather than CAM_REQ_CMPmarius2004-08-021-11/+8
| | | | | | | | | | | | | | in case of a CHECK CONDITION. - Make this driver return SCSI status information. - While here, factor out the clearing of the CAM status from every element of the switch statement to only once before the switch. This fixes burning CDs with recent cdrecord 2.01 alpha versions and burners attached to asr(4) controllers but there could have been other applications and da(4) etc. also affected. Reviewed by: gibbs, scottl MFC after: 2 weeks
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-7/+7
| | | | Bump __FreeBSD_version accordingly.
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Update the version history in the driver to note everything that has happenedscottl2004-05-051-5/+10
| | | | over the last three weeks.
* Roto-till the ioctl code. Remove all the groping around in the x86 BIOSscottl2004-05-051-109/+10
| | | | | | | segment, remove the groping around in the Option ROM segments, remove the bogus tests for bcopy vs. copyout. There really is no reason for a management app to know these things other than to create l33t info tables for the user.
* Convert the asr driver to use the bus_space API. This does not representscottl2004-05-051-89/+151
| | | | | | a significant functional change, but it further cleans up the code and brings it closer to being portable. Thanks to Don Bowman for helping to test this.
* Fix a typo from rev 1.56 that somehow escaped my testing.scottl2004-05-041-10/+10
|
* Remove the static reservation of the asr major numberscottl2004-05-021-2/+0
|
* Remove the defAlignLong and getAlignLong macros. I guess that the originalscottl2004-05-021-103/+91
| | | | | | | intent was to make sure that message structs allocated off of the stack were 4-byte aligned. However, the macros as defined did absolutely nothing. And since I2O forces you to manually copy messages down to the hardware, there really is no point of enforced alignment anyways.
OpenPOWER on IntegriCloud