#
267654 |
|
19-Jun-2014 |
gjb |
Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
251874 |
|
17-Jun-2013 |
scottl |
Big MFC of the physbio changes necessary for unmapped I/O. These changes have been in production at Netflix for several months with significant success.
MFC r246713:
Reform the busdma API so that new types may be added without modifying every architecture's busdma_machdep.c. It is done by unifying the bus_dmamap_load_buffer() routines so that they may be called from MI code. The MD busdma is then given a chance to do any final processing in the complete() callback.
MFC r249538: Some compilers issue a warning when wider integer is casted to narrow pointer. Supposedly shut down the warning by casting through uintptr_t.
MFC r251479: Simplify the checking of flags for cam_periph_mapmem(). This gets rid of a lot of code redundancy and grossness at very minor expense.
MFC r251837: MFC r251842: Add infrastructure for doing compatibility shims, as has been sorely needed for the last 10 years. Far too much of the internal API is exposed, and every small adjustment causes applications to stop working. To kick this off, bump the API version to 0x17 as should have been done with r246713, but add shims to compensate. Thanks to the shims, there should be no visible change in application behavior.
Submitted by: kib, jeffr Approved by: kib Obtained from: Netflix
|
#
251164 |
|
30-May-2013 |
scottl |
MFC 241492, 241588, 241589, 241590, 241592, 241593, 241603, 241605
Modernize and lock the aha, ahb, adv, adw, bt, and dpt drivers.
Submitted by: jhb Obtained from: Netflix
|
#
225736 |
|
22-Sep-2011 |
kensmith |
Copy head to stable/9 as part of 9.0-RELEASE release cycle.
Approved by: re (implicit)
|
#
181530 |
|
10-Aug-2008 |
keramida |
Minor typo fix, caught while skimming through the file.
|
#
170872 |
|
17-Jun-2007 |
scottl |
Prepare for future integration between CAM and newbus. xpt_bus_register 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.
|
#
168752 |
|
15-Apr-2007 |
scottl |
Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 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.
|
#
165102 |
|
11-Dec-2006 |
mjacob |
Add MODULE_DEPENDS for cam, pci, mca, eisa and isa where needed.
PR: 106543 MFC after: 3 days
|
#
163896 |
|
01-Nov-2006 |
mjacob |
2nd and final commit that moves us to CAM_NEW_TRAN_CODE as the default.
Reviewed by multitudes.
|
#
163816 |
|
31-Oct-2006 |
mjacob |
The first of 3 major steps to move the CAM layer forward to using 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
|
#
146734 |
|
29-May-2005 |
nyan |
Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 and amd64. The optimization is a trivial on recent machines.
Reviewed by: -arch (imp, marcel, dfr)
|
#
140040 |
|
11-Jan-2005 |
imp |
Use the standard FreeBSD license
|
#
140025 |
|
10-Jan-2005 |
imp |
Final attempt to make aha 1542A working. If not, oh well, I don't have the card and no way to reproduce problems. We do this by applying the workaround to firmware revsion 0.
PR: 14334
|
#
139749 |
|
05-Jan-2005 |
imp |
Start each of the license/copyright comments with /*-, minor shuffle of lines
|
#
122597 |
|
13-Nov-2003 |
imp |
Save the device so we can do a device_printf. Use this in preference to aha_name. Remove aha_name function and #define it to device_get_unitname() Minor indentation tweaks resulting therefrom
|
#
122385 |
|
10-Nov-2003 |
imp |
Move 'guessing' code from the probe into the identify routine where it more properly belongs.
|
#
122363 |
|
09-Nov-2003 |
imp |
Tweak the front end driver file list Also some minor whitespace nits.
|
#
122361 |
|
09-Nov-2003 |
imp |
Let bus space manage softc.
|
#
122360 |
|
09-Nov-2003 |
imp |
Minor tweaks to make it behave better: o When we're resetting the board, make sure that we error out the pending CCBs first. Otherwise the aha_cmd won't accept further commands, such as those that are used to reset the card (AOP_INITIALIZE_MBOX). This appears to cause a cascade failure where no more commands are possible to the card. o Reduce from 10s down to 1s the amount of time we're willing to tolerate the card being awol. This helps the above case. o Add some error checking to two commands issued in the probe.
I have a dim memory of gibbs@ trying to tell me about this problem a few years ago, so pointy hat to imp@ for sitting on it so long.
|
#
122340 |
|
08-Nov-2003 |
imp |
Make this driver a little more style(9) compliant
|
#
119418 |
|
24-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor style cleanups.
|
#
117126 |
|
01-Jul-2003 |
scottl |
Mega busdma API commit.
Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour.
sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen.
If anyone gets panics or warnings from dflt_lock() being called, please let me know right away.
Reviewed by: tmm, gibbs
|
#
115343 |
|
27-May-2003 |
scottl |
Bring back bus_dmasync_op_t. It is now a typedef to an int, though the BUS_DMASYNC_ definitions remain as before. The does not change the ABI, and reverts the API to be a bit more compatible and flexible. This has survived a full 'make universe'.
Approved by: re (bmah)
|
#
113350 |
|
10-Apr-2003 |
mux |
I deserve a big pointy hat for having missed all those references to bus_dmasync_op_t in my last commit.
|
#
112782 |
|
29-Mar-2003 |
mdodd |
Clean up argument comments for bus_dma_tag_create() calls.
|
#
110232 |
|
02-Feb-2003 |
alfred |
Consolidate MIN/MAX macros into one place (param.h).
Submitted by: Hiten Pandya <hiten@unixdaemons.com>
|
#
108533 |
|
01-Jan-2003 |
schweikh |
Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, especially in troff files.
|
#
104713 |
|
09-Oct-2002 |
peter |
Fix build on alpha. It used to case an int to a pointer in order to do pointer arithmetic. Detour via uintptr_t, since we're generating an offset not dereferencing them.
|
#
97208 |
|
24-May-2002 |
peter |
Fix new gcc-3.1 warnings. I think this gets GENERIC compiling cleanly again.
|
#
72013 |
|
04-Feb-2001 |
imp |
Remove NAHA, NAHATOT and aha_softcs and related code. It was unused except for setting it. Also remove count from aha and replace it with optional.
Also add commented out pccard lines for all the old card drivers. They have to be commented out until they are converted because it causes problems in NEWCARD.
|
#
69963 |
|
13-Dec-2000 |
imp |
Remove unnecessary includes found by phk's script a long time ago.
|
#
67897 |
|
29-Oct-2000 |
dwmalone |
Make a few more mallocs use M_ZERO.
Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: imp
|
#
67164 |
|
15-Oct-2000 |
phk |
Remove unneeded #include <machine/clock.h>
|
#
61686 |
|
14-Jun-2000 |
alex |
Fix typo (accessable --> accessible).
PR: 18588 Submitted by: Anatoly Vorobey <mellon@pobox.com> Reviewed by: asmodai
|
#
59368 |
|
18-Apr-2000 |
phk |
Remove unneeded <sys/buf.h> includes.
Due to some interesting cpp tricks in lockmgr, the LINT kernel shrinks by 924 bytes.
|
#
56504 |
|
24-Jan-2000 |
imp |
Fix plug and play support: o Cut out the probed stuff. We no longer need it since newbus implicitly checks for this (likely bt can be changed as well in this way). o Add preliminary support for unload. Untested because aha doesn't yet support identify and there are some interactions with PnP that I've not yet worked out.
With this I can boot the AHA-1542CP FW F.0. All the aha resources appear to be picked up via pnp now.
|
#
52477 |
|
25-Oct-1999 |
imp |
MIN unused, so kill it
|
#
52133 |
|
11-Oct-1999 |
imp |
Kill unused includes
|
#
51869 |
|
02-Oct-1999 |
mdodd |
Use the PRVERB() macro instead of 'if (bootverbose) printf()...
Add debuging for all failure cases in aha_cmd().
Always check DATAIN_REG_READY even if we're ready to exit the read loop.
The last fix allows the AHA-1640 MCA SCSI adapter to operate correctly and likely fixes problems on a few other oddball adapters. (I suspect my Dell Drive Array in 1540 mode needs this.)
Reviewed by: Warner Losh
|
#
50861 |
|
03-Sep-1999 |
dfr |
Remove vestiges of old pnp code.
|
#
50789 |
|
02-Sep-1999 |
peter |
Missed this use of the old pnp includes. I don't think this is meant to be here though.
|
#
50477 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
49860 |
|
15-Aug-1999 |
gibbs |
Properly set the alignment argument to bus_dma_tag_create(). If we don't care about the alignment, set it to 1, meaning single byte alignment.
|
#
47506 |
|
25-May-1999 |
gibbs |
The 1542 cards do not allow adapter commands to be queued while mailbox commands are outstanding. You'd think they'd just clear the IDLE bit, but alas, no. Delay until all pending mailbox commands have completed in aha_cmd to work around this.
Report sync rates correctly on Fast Adaptec cards. Clones may still be reported incorrectly since there is no documenation on how they report extended sync values.
Clean up some unused fields in the aha softc.
|
#
47208 |
|
14-May-1999 |
imp |
Put a small delay in before sending the inquire_setup command. The docs don't seem to shed light on why this is needed, but reports from the field indicate this helps prevent problems in this area. Ken's changes seem to have exposed this bug, rather than caused it, as far as I can tell.
Thanks to Jack O'Neill for tracking this down.
Submitted by: jack@germanium.xtalwind.net
Very strong 3.2 merge candidate.
|
#
46997 |
|
11-May-1999 |
imp |
Add another kludge to the card identification probe. It appears that some aha 1542B cards will return 0x7f for the unimplemented GEOMETRY register.
This is a good 3.2 candidate.
PR: 11469 Submitted by: Thomas David Rivers
|
#
46602 |
|
06-May-1999 |
peter |
ahatimeout is static..
|
#
46581 |
|
06-May-1999 |
ken |
Add a number of interrelated CAM feature enhancements and bug fixes.
NOTE: These changes will require recompilation of any userland applications, like cdrecord, xmcd, etc., that use the CAM passthrough interface. A make world is recommended.
camcontrol.[c8]: - We now support two new commands, "tags" and "negotiate".
- The tags commands allows users to view the number of tagged openings for a device as well as a number of other related parameters, and it allows users to set tagged openings for a device.
- The negotiate command allows users to enable and disable disconnection and tagged queueing, set sync rates, offsets and bus width. Note that not all of those features are available for all controllers. Only the adv, ahc, and ncr drivers fully support all of the features at this point. Some cards do not allow the setting of sync rates, offsets and the like, and some of the drivers don't have any facilities to do so. Some drivers, like the adw driver, only support enabling or disabling sync negotiation, but do not support setting sync rates.
- new description in the camcontrol man page of how to format a disk - cleanup of the camcontrol inquiry command - add support in the 'devlist' command for skipping unconfigured devices if -v was not specified on the command line. - make use of the new base_transfer_speed in the path inquiry CCB. - fix CCB bzero cases
cam_xpt.c, cam_sim.[ch], cam_ccb.h:
- new flags on many CCB function codes to designate whether they're non-immediate, use a user-supplied CCB, and can only be passed from userland programs via the xpt device. Use these flags in the transport layer and pass driver to categorize CCBs.
- new flag in the transport layer device matching code for device nodes that indicates whether a device is unconfigured
- bump the CAM version from 0x10 to 0x11
- Change the CAM ioctls to use the version as their group code, so we can force users to recompile code even when the CCB size doesn't change.
- add + fill in a new value in the path inquiry CCB, base_transfer_speed. Remove a corresponding field from the cam_sim structure, and add code to every SIM to set this field to the proper value.
- Fix the set transfer settings code in the transport layer.
scsi_cd.c:
- make some variables volatile instead of just casting them in various places - fix a race condition in the changer code - attach unless we get a "logical unit not supported" error. This should fix all of the cases where people have devices that return weird errors when they don't have media in the drive.
scsi_da.c:
- attach unless we get a "logical unit not supported" error
scsi_pass.c:
- for immediate CCBs, just malloc a CCB to send the user request in. This gets rid of the 'held' count problem in camcontrol tags.
scsi_pass.h:
- change the CAM ioctls to use the CAM version as their group code.
adv driver:
- Allow changing the sync rate and offset separately.
adw driver
- Allow changing the sync rate and offset separately.
aha driver:
- Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs.
ahc driver:
- Allow setting offset and sync rate separately
bt driver:
- Don't return CAM_REQ_CMP for SET_TRAN_SETTINGS CCBs.
NCR driver:
- Fix the ultra/ultra 2 negotiation bug - allow setting both the sync rate and offset separately
Other HBA drivers: - Put code in to set the base_transfer_speed field for XPT_GET_TRAN_SETTINGS CCBs.
Reviewed by: gibbs, mjacob (isp), imp (aha)
|
#
45575 |
|
11-Apr-1999 |
eivind |
Staticize.
|
#
44434 |
|
02-Mar-1999 |
imp |
Better logging when the Geometry register probe fails.
|
#
42887 |
|
20-Jan-1999 |
imp |
o enable plug and play support for the aha driver. Given the cumbersome pnp system in freebsd, I'm not sure how useful this will be, but my 1542CP seems to work well in plug and play mode and does seem to probe correctly at all the oddball addresses/irq/drqs that I tried. [[ I was unable to get /kernel.conf or /kernel.config to read in, so I wasn't able to verify that this method of userconfig works. that's one thing that makes pnp so hard to use in the current scheme. Pointers to the right new way of doing this accepted. ]] o Add some kludges to maybe bring support for 1540A/1542A into the driver. Since I have no 154xA cards, and the only person I know that has them hasn't given me feedback, I'm making this commit blind. o Honor unit numbers that are in the config file now. This allows one to hard wire the unit numbers (and have high unit numbers for plug and pray devices, which can't seem to be hardwired) and have the cards not migrate from aha1 -> aha0 should aha0 go on the fritz. I didn't verify that hard wired scsi busses would work, but did verify that hard wired aha addresses did work to a limited extent. Both aha0 and aha1 must be hardwired, or when the card that was in aha0 goes away, the probe for aha0 might pick up the card that otherwise would have been aha1.
|
#
42022 |
|
22-Dec-1998 |
imp |
Invalid is spelled with the v *BEFORE* the a.
|
#
42013 |
|
22-Dec-1998 |
gibbs |
Don't calculate the residual twice.
|
#
41807 |
|
15-Dec-1998 |
imp |
o Convert length of hccb to integer from the array. Eivind Eklund pointed this out, but I've not seen a manifestation of this. o Check against 0x00 as well as 0xff for geometry register, as some clone cards don't return 0xff. Vadim Mikhailov pointed this out in PR 8743 for his Dell SCSI Array controller working in AHA-1540 emulation mode. Note that this test is likely to go away in the future in favor of a better one Justin has recommended.
|
#
41709 |
|
12-Dec-1998 |
gibbs |
Pull in fixes similar to those recently committed to the bt driver:
- For transactions of 0 length, us a non-residual checking CCB type.
- Preserve command status if our interrupt handler completes a command while we are polling for completion in aha_cmd.
|
#
41514 |
|
04-Dec-1998 |
archie |
Examine all occurrences of sprintf(), strcat(), and str[n]cpy() for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc.
These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer.
Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
|
#
41335 |
|
25-Nov-1998 |
imp |
o Patch, slightly altered, from Graham Menhennitt for older aha 1542B cards. My machine didn't tickle this problem, so I can't tell if it fixed anything or not. However, it didn't break my already working 1542-{B,C,CF,CP} probes. o Minor comment correction o Minor correction in printf
|
#
41050 |
|
10-Nov-1998 |
gibbs |
Noop Commit - Change was in last revision.
If the next available mailbox is not in the free state, print a warning and handle the condition as a temporary resource shortage. The condition should never happen, but we shouldn't panic since recovery is possible.
|
#
41047 |
|
10-Nov-1998 |
gibbs |
Fix probes when a port address is specified.
Convert from BT'isms to AHA'isms
Don't fail the probe if the illegal command bit is set in the status register. If the BusLogic MultiMaster probe preceeded us, it may well have determined that the card we are attaching to was not a true MultiMaster by sending us a command that fails on the 154X.
Reset the adapter before doing the inquiry. This provides extra sanity and will also clear the illegal command status bit that my be left over from the MultiMaster probe.
|
#
40419 |
|
15-Oct-1998 |
gibbs |
-Wunused cleanup.
Submitted by: Poul-Henning Kamp <phk@freebsd.org>
|
#
40403 |
|
15-Oct-1998 |
imp |
Reduce the number of ccbs to 16, per the aha documentation. Move bogus comment to proper place.
This should fix the hangs people are seeing under very heavy load, at least it does for me. Please let me know if you continue to have problems.
|
#
40132 |
|
09-Oct-1998 |
gibbs |
Hook up ahapoll so that dumps, synchronize cache commands or any other command that comes in through xpt_polled_action works correctly.
|
#
39881 |
|
02-Oct-1998 |
imp |
GC unused stuff.
|
#
39852 |
|
01-Oct-1998 |
imp |
Misc cleanup and probe rework:
o Use the board id command to find out what kind of board we're talking to. If we're talking to a board that is has an ID that is shared between boards supported by the aha driver and the bt driver, then use the bt's geometry register to weed out the bt cards. Otherwise assume that we support this card. o Remove bt esetup command sending to the card. It seems to wedge too many cards. o Revert to doing a soft reset after an invalid command. This change didn't fix anything, so I'm backing it out. The whole issue of card resetting needs to be revisisted at some point so that we can do it properly on all hardware. o GC unused stuff in some places.
|
#
39795 |
|
29-Sep-1998 |
imp |
Perform a hard reset on cards when the command fails. This should help those people that have cards that become wedged when a bogus command is issued that are too wedged to have a soft reset help.
|
#
39751 |
|
29-Sep-1998 |
imp |
Several minor cleanups, inspired by bug reports and the old driver:
o Unlock mailbox interface if we have a new card. Before only newer cards (B or newer) that had the BIOS disabled would probe. Cards with the BIOS enabled would fail to probe in the mailbox initialization code. o Increase the number of ccbs and sg to 17 from 16 to support 64k I/O on a non page aligned boundary. Ideas for dynamic determination of this value welcomed, as more of these are better. o Took credit for this driver, even though I derived it from Justin's code. Made sure that Justin's copyright from bt.c was preserved, along with his name, since the error handling code is nearly identical. Add my own, identical copyright. Point people to aha_isa.c.
Cards tested: 1542C and 1542CF. The B and CP might work now as well, but logistical problems precluded me from testing them this evening (if you have jumper settings for the B card, please send me private mail).
|
#
39390 |
|
16-Sep-1998 |
gibbs |
Use %p with (void *) casts to print pointers with printf.
|
#
39324 |
|
16-Sep-1998 |
gibbs |
Fix printf format bugs.
|
#
39225 |
|
15-Sep-1998 |
gibbs |
Adaptec 154X SCSI-Host Adapter driver for CAM.
Submitted by: Warner Losh <imp@village.org>
|