331722 |
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re) |
331636 |
27-Mar-2018 |
brooks |
MFC r330949:
Fix FSACTL_GET_NEXT_ADAPTER_FIB under 32-bit compat.
This includes FSACTL_LNX_GET_NEXT_ADAPTER_FIB.
Reviewed by: cem Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14672 |
330897 |
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg |
328167 |
19-Jan-2018 |
mav |
MFC r323317 (by scottl): Move the intrhook release to later in the function so that GEOM knows to wait longer for possible root devices to come online. This fixes a race that seems to be triggered by EARLY_AP_STARTUP.
Submitted by: cgull@glup.org |
315812 |
23-Mar-2017 |
mav |
MFC r311305 (by asomers): Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)
The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are fixed-length strings. AFAICT the only place they're read is in sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated. However, the kernel doesn't null-terminate them. A bunch of copy-pasted code uses strncpy to write them, and doesn't guarantee null-termination. For at least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually overflows. You can see the result by doing "camcontrol negotiate da0 -v".
This change null-terminates those fields everywhere they're set in the kernel. It also shortens a few strings to ensure they'll fit within the 16-character field.
PR: 215474 Reported by: Coverity CID: 1009997 1010000 1010001 1010002 1010003 1010004 1010005 CID: 1331519 1010006 1215097 1010007 1288967 1010008 1306000 CID: 1211924 1010009 1010010 1010011 1010012 1010013 1010014 CID: 1147190 1010017 1010016 1010018 1216435 1010020 1010021 CID: 1010022 1009666 1018185 1010023 1010025 1010026 1010027 CID: 1010028 1010029 1010030 1010031 1010033 1018186 1018187 CID: 1010035 1010036 1010042 1010041 1010040 1010039 |
302408 |
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
298955 |
03-May-2016 |
pfg |
sys/dev: minor spelling fixes.
Most affect comments, very few have user-visible effects.
|
298280 |
19-Apr-2016 |
sbruno |
aacraid(4): Sanely copyin userland pointers and ensure that we don't get anything janky from a user. (cturt)
aac(4): landergriffith+freebsdbugzilla@gmail.com pointed out that aacraid(4) had the same issue and handling of pointers, so let's change that too.
PR: 206573 Submitted by: cturt@hardenedbsd.org Obtained from: HardenedBSD MFC after: 1 week
|
297793 |
10-Apr-2016 |
pfg |
Cleanup unnecessary semicolons from the kernel.
Found with devel/coccinelle.
|
296272 |
01-Mar-2016 |
jhb |
Remove taskqueue_enqueue_fast().
taskqueue_enqueue() was changed to support both fast and non-fast taskqueues 10 years ago in r154167. It has been a compat shim ever since. It's time for the compat shim to go.
Submitted by: Howard Su <howard0su@gmail.com> Reviewed by: sephe Differential Revision: https://reviews.freebsd.org/D5131
|
296137 |
27-Feb-2016 |
jhibbits |
Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().
Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API.
Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370
|
280347 |
22-Mar-2015 |
mav |
Remove MAXBSIZE use from drivers where it has nothing to do.
In some cases limits are just not needed, in others -- DFLTPHYS is the right constant to use instead.
MFC after: 1 month
|
267992 |
28-Jun-2014 |
hselasky |
Pull in r267961 and r267973 again. Fix for issues reported will follow.
|
267985 |
27-Jun-2014 |
gjb |
Revert r267961, r267973:
These changes prevent sysctl(8) from returning proper output, such as:
1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
|
267961 |
27-Jun-2014 |
hselasky |
Extend the meaning of the CTLFLAG_TUN flag to automatically check if there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel.
Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change.
MFC after: 2 weeks Sponsored by: Mellanox Technologies
|
266281 |
17-May-2014 |
jhb |
Clear the data buffer length field when freeing a command structure so that it doesn't leak through when the command structure is reused for a user command without a data buffer.
PR: amd64/189668 Tested by: Pete Long <pete@nrth.org> MFC after: 1 week
|
263233 |
16-Mar-2014 |
rwatson |
Update kernel inclusions of capability.h to use capsicum.h instead; some further refinement is required as some device drivers intended to be portable over FreeBSD versions rely on __FreeBSD_version to decide whether to include capability.h.
MFC after: 3 weeks
|
260044 |
29-Dec-2013 |
marius |
Free the MSI again on detach if allocated. Arguably, this code would be better off living in aac_pci.c, but it doesn't seem worth creating a aac_pci_detach() and it's also not the first PCI-specific bit in aac.c
MFC after: 3 days
|
258780 |
30-Nov-2013 |
eadler |
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this shifts into the sign bit. Instead use (1U << 31) which gets the expected result.
This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases.
A similar change was made in OpenBSD.
Discussed with: -arch, rdivacky Reviewed by: cperciva
|
255219 |
05-Sep-2013 |
pjd |
Change the cap_rights_t type from uint64_t to a structure that we can extend in the future in a backward compatible (API and ABI) way.
The cap_rights_t represents capability rights. We used to use one bit to represent one right, but we are running out of spare bits. Currently the new structure provides place for 114 rights (so 50 more than the previous cap_rights_t), but it is possible to grow the structure to hold at least 285 rights, although we can make it even larger if 285 rights won't be enough.
The structure definition looks like this:
struct cap_rights { uint64_t cr_rights[CAP_RIGHTS_VERSION + 2]; };
The initial CAP_RIGHTS_VERSION is 0.
The top two bits in the first element of the cr_rights[] array contain total number of elements in the array - 2. This means if those two bits are equal to 0, we have 2 array elements.
The top two bits in all remaining array elements should be 0. The next five bits in all array elements contain array index. Only one bit is used and bit position in this five-bits range defines array index. This means there can be at most five array elements in the future.
To define new right the CAPRIGHT() macro must be used. The macro takes two arguments - an array index and a bit to set, eg.
#define CAP_PDKILL CAPRIGHT(1, 0x0000000000000800ULL)
We still support aliases that combine few rights, but the rights have to belong to the same array element, eg:
#define CAP_LOOKUP CAPRIGHT(0, 0x0000000000000400ULL) #define CAP_FCHMOD CAPRIGHT(0, 0x0000000000002000ULL)
#define CAP_FCHMODAT (CAP_FCHMOD | CAP_LOOKUP)
There is new API to manage the new cap_rights_t structure:
cap_rights_t *cap_rights_init(cap_rights_t *rights, ...); void cap_rights_set(cap_rights_t *rights, ...); void cap_rights_clear(cap_rights_t *rights, ...); bool cap_rights_is_set(const cap_rights_t *rights, ...);
bool cap_rights_is_valid(const cap_rights_t *rights); void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src); void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little);
Capability rights to the cap_rights_init(), cap_rights_set(), cap_rights_clear() and cap_rights_is_set() functions are provided by separating them with commas, eg:
cap_rights_t rights;
cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_FSTAT);
There is no need to terminate the list of rights, as those functions are actually macros that take care of the termination, eg:
#define cap_rights_set(rights, ...) \ __cap_rights_set((rights), __VA_ARGS__, 0ULL) void __cap_rights_set(cap_rights_t *rights, ...);
Thanks to using one bit as an array index we can assert in those functions that there are no two rights belonging to different array elements provided together. For example this is illegal and will be detected, because CAP_LOOKUP belongs to element 0 and CAP_PDKILL to element 1:
cap_rights_init(&rights, CAP_LOOKUP | CAP_PDKILL);
Providing several rights that belongs to the same array's element this way is correct, but is not advised. It should only be used for aliases definition.
This commit also breaks compatibility with some existing Capsicum system calls, but I see no other way to do that. This should be fine as Capsicum is still experimental and this change is not going to 9.x.
Sponsored by: The FreeBSD Foundation
|
254005 |
06-Aug-2013 |
marius |
- Fix a bug in the MSI allocation logic so an MSI is also employed if a controller supports only a single message. I haven't seen such an adapter out in the wild, though, so this change likely is a NOP. While at it, further simplify the MSI allocation logic; there's no need to check the number of available messages on our own as pci_alloc_msi(9) will just fail if it can't provide us with the single message we want. - Nuke the unused softc of aacch(4).
MFC after: 1 month
|
254004 |
06-Aug-2013 |
marius |
As it turns out, MSIs are broken with 2820SA so introduce an AAC_FLAGS_NOMSI quirk and apply it to these controllers [1]. The same problem was reported for 2230S, in which case it wasn't actually clear whether the culprit is the controller or the mainboard, though. In order to be on the safe side, flag MSIs as being broken with the latter type of controller as well. Given that these are the only reports of MSI-related breakage with aac(4) so far and OSes like OpenSolaris unconditionally employ MSIs for all adapters of this family, however, it doesn't seem warranted to generally disable the use of MSIs in aac(4). While it, simplify the MSI allocation logic a bit; there's no need to check for the presence of the MSI capability on our own as pci_alloc_msi(9) will just fail when these kind of interrupts are not available. Reported and tested by: David Boyd [1]
MFC after: 3 days
|
251116 |
30-May-2013 |
marius |
Allow unmapped I/O via aacd(4). It shouldn't be too hard to add the same support for aacp(4), I'm lacking the necessary hardware for testing, though.
|
251115 |
30-May-2013 |
marius |
- Remove pointless returns. - Make cm_data a void pointer and cm_flags unsigned as appropriate.
MFC after: 3 days
|
249468 |
14-Apr-2013 |
mav |
MFprojects/camlock r248982: Stop abusing xpt_periph in random plases that really have no periph related to CCB, for example, bus scanning. NULL value is fine in such cases and it is correctly logged in debug messages as "noperiph". If at some point we need some real XPT periphs (alike to pmpX now), quite likely they will be per-bus, and not a single global instance as xpt_periph now.
|
247591 |
01-Mar-2013 |
marius |
Initialize count in order to appease clang.
Submitted by: delphij
|
247570 |
01-Mar-2013 |
marius |
- Make tables, device ID strings etc const. This includes #ifdef'ing 0 aac_command_status_table, which is actually unused since r111532. While at it, make aac_if a pointer to the now const interface tables instead of copying them over to the softc (this alone already reduces the size of aac.ko on amd64 by ~1 KiB). - Remove redundant softc members. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. - Remove redundant bzero(9)'ing of the softc. - Use pci_enable_busmaster(9) instead of duplicating it. - Remove redundant checking for PCIM_CMD_MEMEN (resource allocation will just fail). - Canonicalize the error messages in case of resource allocation failures. - Add support for using MSI instead of INTx, controllable via the tunable hw.aac.enable_msi (defaulting to on).
MFC after: 1 month
|
246713 |
12-Feb-2013 |
kib |
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.
The cam changes unify the bus_dmamap_load* handling in cam drivers.
The arm and mips implementations are updated to track virtual addresses for sync(). Previously this was done in a type specific way. Now it is done in a generic way by recording the list of virtuals in the map.
Submitted by: jeff (sponsored by EMC/Isilon) Reviewed by: kan (previous version), scottl, mjacob (isp(4), no objections for target mode changes) Discussed with: ian (arm changes) Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris), amd64 (Fabian Keil <freebsd-listen@fabiankeil.de>)
|
242823 |
09-Nov-2012 |
rdivacky |
Give panic format string to pacify clang warning.
|
240923 |
25-Sep-2012 |
rstone |
Some aac(4) adapters will always report that a direct access device is offline in response to a INQUIRY command that does not retreive vital product data(I personally have observed the behaviour on an Adaptec 2405 and a 5805). Force the peripheral qualifier to "connected" so that upper layers correctly recognize that a disk is present.
This bug was uncovered by r216236. Prior to that fix, aac(4) was accidentally clearing the peripheral qualifier for all inquiry commands.
This fixes an issue where passthrough devices were not created for disks behind aac(4) controllers suffering from the bug. I have verified that if a disk is not present that we still properly detect that and not create the passthrough device.
Sponsored by: Sandvine Incorporated MFC after: 1 week
|
238601 |
18-Jul-2012 |
sbruno |
On BIO_ERROR, set bio_resid to stop losing data in the error case.
Submitted by: Mark Johnston <markjdb@gmail.com> Reviewed by: scottl@freebsd.org MFC after: 2 weeks
|
238201 |
07-Jul-2012 |
eadler |
Remove variables which are initialized but never used thereafter reported by gcc46 warning
Approved by: cperciva MFC after: 1 week
|
232668 |
07-Mar-2012 |
jhb |
Use bus_get_dma_tag() to inherit the PCI bus' 4G boundary constraint.
Tested by: emaste
|
232268 |
28-Feb-2012 |
emaste |
Revert r232260.
The problem is now fixed by a general workaround in r232267.
|
232260 |
28-Feb-2012 |
emaste |
Avoid transfers crossing a 4GB boundary, which can lead to data corruption. Thanks to scottl@ for the suggestion.
This change will likely be revised after consideration of a general method to address this type of issue for other drivers.
Sponsored by: Sandvine Incorporated MFC after: 3 days
|
231589 |
13-Feb-2012 |
emaste |
Add a sysctl to report the firmware build number.
Some older firmware versions have issues that can be worked around by avoiding certain operations. Add a sysctl dev.aac.#.firmware_build to make it easy for scripts or userland tools to detect the firmware version.
|
227843 |
22-Nov-2011 |
marius |
- There's no need to overwrite the default device method with the default one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
|
227309 |
07-Nov-2011 |
ed |
Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.
The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
|
227293 |
07-Nov-2011 |
ed |
Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.
This means that their use is restricted to a single C file.
|
226350 |
13-Oct-2011 |
marius |
Merge from r225950:
Set the sense residual properly.
Reviewed by: ken
|
224778 |
11-Aug-2011 |
rwatson |
Second-to-last commit implementing Capsicum capabilities in the FreeBSD kernel for FreeBSD 9.0:
Add a new capability mask argument to fget(9) and friends, allowing system call code to declare what capabilities are required when an integer file descriptor is converted into an in-kernel struct file *. With options CAPABILITIES compiled into the kernel, this enforces capability protection; without, this change is effectively a no-op.
Some cases require special handling, such as mmap(2), which must preserve information about the maximum rights at the time of mapping in the memory map so that they can later be enforced in mprotect(2) -- this is done by narrowing the rights in the existing max_protection field used for similar purposes with file permissions.
In namei(9), we assert that the code is not reached from within capability mode, as we're not yet ready to enforce namespace capabilities there. This will follow in a later commit.
Update two capability names: CAP_EVENT and CAP_KEVENT become CAP_POST_KEVENT and CAP_POLL_KEVENT to more accurately indicate what they represent.
Approved by: re (bz) Submitted by: jonathan Sponsored by: Google Inc
|
222951 |
10-Jun-2011 |
attilio |
- Fix races on detach handling of AAC_IFFLAGS_* mask - Fix races on setting AAC_AIFFLAGS_ALLOCFIBS - Remove some unused AAC_IFFLAGS_* bits. Please note that the kthread still makes a difference between the total mask and AAC_AIFFLAGS_ALLOCFIBS because more flags may be added in the future to aifflags.
Sponsored by: Sandvine Incorporated Reported and reviewed by: emaste MFC after: 2 weeks
|
218280 |
04-Feb-2011 |
emaste |
We can pass a format string and args to panic(), so instead of using printf() to output some information before a panic, just include that information in the panic.
Submitted by: bde Reviewed by: bde
|
218208 |
03-Feb-2011 |
emaste |
Include driver name in panic string, to make it easier to find these should the panic ever occur.
|
218207 |
03-Feb-2011 |
emaste |
Revert part of r173264. Both aac_ioctl_sendfib and aac_ioctl_send_raw_srb make use of the aac_ioctl_event callback, if aac_alloc_command fails. This can end up in an infinite loop in the while loop in aac_release_command.
Further investigation into the issue mentioned by Scott Long [1] will be necessary.
[1] http://lists.freebsd.org/pipermail/freebsd-current/2007-October/078740.html
|
216236 |
06-Dec-2010 |
jhb |
When masking direct and processor devices during an inquiry, properly preserve the upper bits of the first data byte.
Reviewed by: scottl MFC after: 1 week
|
213272 |
29-Sep-2010 |
emaste |
Previously, the aac driver did not handle enclosure management AIFs, which were raised during hot-swap events. Now such events trigger cam rescans, as is done in the mps driver.
Submitted by: Mark Johnston <mjohnston at sandvine dot com>
|
212773 |
16-Sep-2010 |
emaste |
Use device_printf where possible, and otherwise at least include the driver name in printf strings.
Reported by: Mark Johnston
|
212756 |
16-Sep-2010 |
attilio |
Implement device unbusying via a cdevpriv destructor.
Suggested by: jhb Tested by: Mark Johnston <mjohnston at sandvine dot com> Reviewed by: emaste, jhb MFC after: 10 days X-MFC: r212661
|
212661 |
15-Sep-2010 |
attilio |
Fix bogus busying mechanism from cdevsw callbacks: - D_TRACKCLOSE may be used there as d_close() are expected to match up d_open() calls - Replace the hand-crafted counter and flag with the device_busy()/device_unbusy() proper usage.
Sponsored by: Sandvine Incorporated Reported by: Mark Johnston <mjohnston at sandvine dot com> Tested by: Mark Johnston Reviewed by: emaste
MFC after: 10 days
|
212628 |
15-Sep-2010 |
emaste |
Add some enums and constants from Adaptec's latest driver (build 17911).
|
212594 |
14-Sep-2010 |
emaste |
Avoid repeatedly spamming the console while a timed out command is waiting to complete. Instead, print one message after the timeout period expires, and one more when (if) the command eventually completes.
MFC after: 1 month
|
206555 |
13-Apr-2010 |
emaste |
Use enums in the aac_command_status_table rather than duplicating the same values in two places.
Suggested by: Garrett Cooper
|
206540 |
13-Apr-2010 |
emaste |
Sync some minor items with the upstream driver. Should have no functional change.
|
206534 |
13-Apr-2010 |
emaste |
Whitespace cleanup, in advance of next sync with Adaptec's driver. No functional change.
|
205167 |
15-Mar-2010 |
attilio |
Make the code more readable and compiling on 64-bits arch different than amd64.
Sponsored by: Sandvine Incorporated Submitted by: emaste MFC: 2 weeks X-MFC: r205160
|
205160 |
14-Mar-2010 |
attilio |
Checkin a facility for specifying a passthrough FIB from userland. arcconf tool by Adaptec already seems to use for identifying the Serial Number of the devices. Some simple things (like FIB setup and bound checks) are retrieved from the Adaptec's driver, but this implementation is quite different because it does use the normal buffer dmat area for loading segments and not a special one (like the Adaptec's one does).
Sponsored by: Sandvine Incorporated Discussed with: emaste, scottl Reviewed by: emaste, scottl MFC: 2 weeks
|
204264 |
23-Feb-2010 |
emaste |
Minor diff reduction with Adaptec's driver: in aac_release_command() set cm_queue to AAC_ADAP_NORM_CMD_QUEUE by default. In every place it was set, it was set to AAC_ADAP_NORM_CMD_QUEUE anyhow.
|
204019 |
17-Feb-2010 |
emaste |
Include command type in COMMAND TIMEOUT messages to aid in debugging.
|
203885 |
14-Feb-2010 |
emaste |
Diff reduction with Adaptec's vendor driver.
Driver version 2.1.9 chosen as that Adaptec version roughly corresponds with the current feature set merged to the in-tree driver.
|
203801 |
12-Feb-2010 |
emaste |
Garbage collect Falcon/PPC support that has not been used in released products, based on discussion with Adaptec.
|
201758 |
07-Jan-2010 |
mbr |
Remove extraneous semicolons, no functional changes.
Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
|
200251 |
08-Dec-2009 |
jkim |
- Try pre-allocating all FIBs upfront. Previously we tried pre-allocating 128 FIBs first and allocated more later if necessary. Remove now unused definitions from the header file[1]. - Force sequential bus scanning. It seems parallel scanning is in fact slower and causes more harm than good[1]. Adjust a comment to reflect that.
PR: kern/141269 Submitted by: Alexander Sack (asack at niksun dot com)[1] Reviewed by: scottl
|
198617 |
29-Oct-2009 |
emaste |
Rename aac_srb32 to aac_srb, to match Adaptec's vendor driver.
|
198593 |
29-Oct-2009 |
emaste |
Rename aac_fast_intr to aac_filter to reflect its current use. Eliminate the fallback of using the filter as an interrupt handler, as it is no longer needed.
Discussed with: scottl, jhb
|
198541 |
28-Oct-2009 |
emaste |
Do first controller time sync after 1 minute, as in Adaptec's vendor driver.
|
198525 |
27-Oct-2009 |
emaste |
Whitespace fixup: 8 spaces -> tab
|
197016 |
09-Sep-2009 |
emaste |
Whitespace tweak.
Submitted by: phk, via accidental commit in r196969.
|
197011 |
09-Sep-2009 |
emaste |
Increase AAC_CMD_TIMEOUT from 30s to 120s to help avoid spurious "COMMAND 0x........ TIMEOUT AFTER .. SECONDS" messages. Any commands that get truly stuck will still trigger the warning and the hardware health check, just a little bit later.
|
196970 |
08-Sep-2009 |
phk |
Revert previous commit and add myself to the list of people who should know better than to commit with a cat in the area.
|
196969 |
08-Sep-2009 |
phk |
Add necessary include.
|
196403 |
20-Aug-2009 |
jhb |
Temporarily revert the new-bus locking for 8.0 release. It will be reintroduced after HEAD is reopened for commits by re@.
Approved by: re (kib), attilio
|
196037 |
02-Aug-2009 |
attilio |
Make the newbus subsystem Giant free by adding the new newbus sxlock. The newbus lock is responsible for protecting newbus internIal structures, device states and devclass flags. It is necessary to hold it when all such datas are accessed. For the other operations, softc locking should ensure enough protection to avoid races.
Newbus lock is automatically held when virtual operations on the device and bus are invoked when loading the driver or when the suspend/resume take place. For other 'spourious' operations trying to access/modify the newbus topology, newbus lock needs to be automatically acquired and dropped.
For the moment Giant is also acquired in some key point (modules subsystem) in order to avoid problems before the 8.0 release as module handlers could make assumptions about it. This Giant locking should go just after the release happens.
Please keep in mind that the public interface can be expanded in order to provide more support, if there are really necessities at some point and also some bugs could arise as long as the patch needs a bit of further testing.
Bump __FreeBSD_version in order to reflect the newbus lock introduction.
Reviewed by: ed, hps, jhb, imp, mav, scottl No answer by: ariff, thompsa, yongari Tested by: pho, G. Trematerra <giovanni dot trematerra at gmail dot com>, Brandon Gooch <jamesbrandongooch at gmail dot com> Sponsored by: Yahoo! Incorporated Approved by: re (ksmith)
|
195614 |
11-Jul-2009 |
jkim |
Get correct maxio from the controller and drop the tunable. The default (64K) is too pessimistic for "new comm" hardware. Also, this is bad because multiple controllers get limited by the global tunable.
Reviewed by: scottl Approved by: re (kensmith)
|
192450 |
20-May-2009 |
imp |
We no longer need to use d_thread_t, migrate to struct thread *.
|
188940 |
23-Feb-2009 |
emaste |
SVN rev 188743 modified aac_rx_get_fwstatus to use the AAC_RX_OMR0 register instead of AAC_RX_FWSTATUS, as that is the way it's done in Adaptec's vendor driver and in the Linux drivers. (The same applies to aac_rkt_get_fwstatus as well.)
However, a concern has been raised about the compatibility of this change and old hardware / firmware versions. In the absense of specific information, revert to the original behaviour if the firmware does not support the "New comm." interface. Users of old cards or firmware haven't reported the problems that are potentially solved by switching to OMR0.
|
188896 |
21-Feb-2009 |
attilio |
Sync with the official Adaptec vendor driver:
[1] Add the support for the NARK controller which seems a variant of the i960Rx. [2] Split up memory regions and other resources in 2 different parts as long as NARK uses them separately (it is not clear to me why though as long as there are no more informations available on this controller). Please note that in all the other cases, the regions overlaps leaving the default behaviour for all the other controllers. [3] Implement a clock daemon responsible for maintain updated the wall clock time of the controller (run any 30 minutes)*.
Submitted by: Adaptec (driver build 15317 [1, 2] and 15727 [3]) Reviewed by: emaste Tested by: emaste Sponsored by: Sandvine Incorporated
* Please note that originally, in the Adaptec driver, the clock daemon is not implemented with callouts as in our in-tree driver.
|
188743 |
18-Feb-2009 |
emaste |
Use outbound message register 0 instead of mailbox 7 in aac_{rx,rkt}_get_fwstatus, as done in Adaptec's vendor driver as well as the Linux drivers.
Submitted by: jkim, from Adaptec's driver
|
185376 |
27-Nov-2008 |
emaste |
Remove duplicate 2610SA entry.
Submitted by: jkim
|
182967 |
12-Sep-2008 |
emaste |
Whitespace cleanup.
|
180072 |
27-Jun-2008 |
emaste |
Add explicit PCI IDs for the following Adaptec RAID Series 2 adapters:
Adaptec RAID 2045 Adaptec RAID 2405 Adaptec RAID 2445 Adaptec RAID 2805
Without this change these devices are supported by the driver's family support, but they then appear as "Adaptec RAID Controller" in boot messages and the dev.aac.0.%desc sysctl.
|
179969 |
24-Jun-2008 |
emaste |
Fix test for waiting AIFs in aac_poll(). This seems to solve the problem where Adaptec's arcconf monitoring tool hangs after producing its expected output.
Submitted by: Adaptec, via driver ver 15317 MFC after: 1 week
|
177899 |
03-Apr-2008 |
emaste |
Allow crashdumps on machines with >4GB of RAM as long as the adapter can do 64-bit S/G.
Submitted by: Alex Bencz Reviewed by: scottl
|
177845 |
01-Apr-2008 |
emaste |
Calling RequestSupplementAdapterInfo before RequestAdapterInfo appears to trip a bug causing the latter to return a zeroed struct aac_adapter_info. This causes two issues. One is cosmetic only -- a verbose boot prints information about the controller, and shows all zero:
aac0: Unknown processor 0MHz, 0MB memory (0MB cache, 0MB execution), unknown battery platform
The second problem is that the firmware version information is stored away for aac_rev_check, for userland tools (like aaccli) to query via the FSACTL_MINIPORT_REV_CHECK and FSACTL_LNX_MINIPORT_REV_CHECK ioctls. When aaccli encounters this issue it prints
Command Error: <The current AFAAPI.DLL is too old to work with the current controller software.>
Move the RequestSupplementAdapterInfo call after RequestAdapterInfo, which seems to fix both problems.
|
177695 |
28-Mar-2008 |
emaste |
Implement FSACTL_LNX_GET_FEATURES and FSACTL_GET_FEATURES ioctls. RAID tools (e.g. arcconf) need this to be able to create arrays larger than 2TB.
Submitted by: Adaptec, via driver build 15317
|
177635 |
26-Mar-2008 |
emaste |
Add \n to the end of a printf string and remove it from panic strings.
|
177619 |
25-Mar-2008 |
emaste |
Add 64-bit array support for RAIDs > 2TB. This corresponds to ~ Adaptec driver build 15317.
Tested on: Adaptec 2230S, Firmware 4.2-0 (8205) ICP ICP5085BL, Firmware 5.2-0 (12814)
Submitted by: Adaptec
|
177611 |
25-Mar-2008 |
emaste |
Correct data direction flags in aac_bio_command() in the !AAC_FLAGS_RAW_IO && AAC_FLAGS_SG_64BIT case.
Submitted by: Adaptec
|
177567 |
24-Mar-2008 |
emaste |
Diff reduction to Adaptec's driver (around build 15317): catch up with a change in debugging routines.
The fwprintf macro in the AAC_DEBUG case (mapping to printf) isn't from the Adaptec driver.
|
177557 |
24-Mar-2008 |
emaste |
Diff reduction to Adaptec driver build 15317 (refactoring and code shuffling):
- Resource allocation in aac_alloc (moved from from aac_init) - Interrupt setup in aac_setup_intr (from aac_attach) - Container probing in aac_get_container_info (from aac_startup and aac_handle_aif) - Firmware status check moved to aac_check_firmware from aac_init
|
177463 |
20-Mar-2008 |
emaste |
Restore creation of passthrough devices with newer controller firmware by putting the correct size in the fib header. Presumably the older firmware silently ignored a bad size field.
(This change tested with a 3805 controller. Passthrough devices were created when running firmware build 12814, but not 15323 or later. With this change they're created for both old and new firmware versions.)
Submitted by: Adaptec
|
177462 |
20-Mar-2008 |
emaste |
Add ioctls FSACTL_SEND_LARGE_FIB, FSACTL_SEND_RAW_SRB, FSACTL_LNX_SEND_LARGE_FIB, and FSACTL_LNX_SEND_RAW_SRB, and correct size checks on FIBs passed in from userspace. Both changes were obtained from Adaptec's driver build 15317. Adaptec's commandline RAID tool arcconf uses these ioctls when creating a RAID-10 array (and probably other operations too).
|
177184 |
14-Mar-2008 |
emaste |
Change spelling and eliminate a typo in comments to reduce diffs with Adaptec's vendor driver. I have some fixes to bring in and this makes ongoing review of the FreeBSD-Adaptec driver diffs easier.
|
174819 |
20-Dec-2007 |
emaste |
Avoid holding the aac_io_lock over copyout.
Submitted by: Achim Leubner @ Adaptec.
|
174774 |
19-Dec-2007 |
emaste |
Do not recursively acquire aac_io_lock in aac_ioctl_event.
MFC After: 3 days
|
174417 |
07-Dec-2007 |
emaste |
Merge from Adaptec a 64 bit fix and a workaround for luns != 0 returning CAM_SEL_TIMEOUT on SAS controllers, which prevented passthrough devices from being created.
|
174412 |
07-Dec-2007 |
emaste |
Add family support to allow the driver to attach to new devices that share the same interface.
Submitted by: Achim Leubner at Adaptec
|
174385 |
07-Dec-2007 |
emaste |
Allow simultaneous opens of the device for issuing commands to the controller. This is merged from Adaptec driver build 11669.
|
174368 |
06-Dec-2007 |
emaste |
Add more PCI ID's from Adaptec's driver, including two requested by Daniel Kamm.
Adaptec RAID 51245 Adaptec RAID 51645 Adaptec RAID 52445 Adaptec RAID 5405 Sun STK RAID REM Sun STK RAID EM SG-XPCIESAS-R-IN SG-XPCIESAS-R-EX
|
174325 |
06-Dec-2007 |
emaste |
Add PCI IDs for additional cards:
AOC-USAS-S4i AOC-USAS-S8i AOC-USAS-S4iR AOC-USAS-S8iR AOC-USAS-S8i-LP AOC-USAS-S8iR-LP
|
173883 |
24-Nov-2007 |
rwatson |
Respell 'Conatainer' as 'Container'.
MFC after: 3 days Reported by: Toomas Aas <toomas dot aas at raad dot tartu dot ee>
|
173264 |
01-Nov-2007 |
emaste |
Rework aac locking for MPSAFE CAM. This fixes a Giant mutex assertion reported on freebsd-current [1].
Also dequeue all events in aac_release_command (instead of just one) so that there's no risk of them getting stranded.
Reported by: Steven Brown [1] Submitted by: scottl@
[1] http://lists.freebsd.org/pipermail/freebsd-current/2007-October/077928.html
|
172836 |
20-Oct-2007 |
julian |
Rename the kthread_xxx (e.g. kthread_create()) calls 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.
|
172672 |
15-Oct-2007 |
emaste |
Correct calculation of aac_sg_tablesize.
Obtained from: Adaptec, via driver b11669
|
172653 |
14-Oct-2007 |
emaste |
Add PCI IDs from Adaptec's driver version b11669:
Adaptec RAID 3085 Adaptec RAID 31205 Adaptec RAID 31605 Adaptec RAID 5085 Adaptec RAID 51205 Adaptec RAID 51605 Adaptec RAID 5445 Adaptec RAID 5805 IBM ServeRAID 8s ICP RAID ICP5045BL ICP RAID ICP5085BL ICP RAID ICP5085SL ICP RAID ICP5125BR ICP RAID ICP5125SL ICP RAID ICP5165BR ICP RAID ICP5165SL ICP RAID ICP5445SL ICP RAID ICP5805BL ICP RAID ICP5805SL ICP9067MA SATA RAID
|
171940 |
23-Aug-2007 |
emaste |
Add PCI IDs for two cards: - Adaptec RAID 3405 - Adaptec RAID 3805
Approved by: re (bmah) Submitted by: John Marra jmarra at nmu dot edu MFC After: 1 week
|
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.
|
166901 |
23-Feb-2007 |
piso |
o break newbus api: add a new argument of type driver_filter_t to 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@
|
166704 |
14-Feb-2007 |
luoqi |
The return value of aac_alloc_command() was misinterpreted in aac_ioctl_event(). Once triggered this would leak away all available commands and starve the rest of the driver.
Reviewed by: scottl
|
166025 |
15-Jan-2007 |
scottl |
Add a missing mutex unlock to an error path.
Submitted by: Yuxiang Luo PR: 107943
|
165393 |
20-Dec-2006 |
delphij |
On amd64 platform, use linux32 headers so 32-bit Linux applications would be able to work with aac(4).
This approach is used by some other drivers as well. However, we need a more generic way to do this in order to avoid having to special case headers in individual drivers for each platform.
Obtained from: Adaptec (version b11518) Approved by: scottl
|
165102 |
11-Dec-2006 |
mjacob |
Add MODULE_DEPENDS for cam, pci, mca, eisa and isa where needed.
PR: 106543 MFC after: 3 days
|
163930 |
03-Nov-2006 |
scottl |
Add PCI Id for ServeRAID 8k.
Submitted by: Danny Braniss
|
163896 |
02-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
|
160344 |
14-Jul-2006 |
delphij |
Unlock aac_io_lock before returning, thus eliminates a mutex leak.
Submitted by: Beyond Luo <fedora ercist iscas ac cn> PR: kern/100046 Reviewed by: scottl
|
159702 |
17-Jun-2006 |
brueffer |
Correct the names or some Adaptec and ICP devices, verified by the respective websites.
Reviewed by: scottl Approved by: rwatson (mentor) MFC after: 5 days
|
157587 |
08-Apr-2006 |
scottl |
Rearrange locking in the alloc_commands and ioctl paths to avoid problems.
|
153810 |
28-Dec-2005 |
scottl |
Initialize the event tailq.
Submitted by: Frank Mayhar PR: kern/90882 MFC After: 1 day
|
152388 |
13-Nov-2005 |
schweikh |
Remove the unused AAC_DRIVER_BUILD_DATE macro. Nuke whitespace at EOL while I'm here.
Approved by: scottl (MAINTAINER)
|
152144 |
06-Nov-2005 |
scottl |
Refactor the PCI probe code a bit.
|
151893 |
31-Oct-2005 |
csjp |
Pickup I/O lock in aac_get_bus_info, as this code will call aac_alloc_sync_fib(). aac_alloc_sync_fib() will assert that the I/O locks are held. This fixes a panic on system boot up when the aac(4) device's bus_generic_attach() routine is called.
Reviewed by: scottl
|
151330 |
14-Oct-2005 |
scottl |
Fix a regression that prevented PERC3 hardware from working. Apparently they do not support the GETINFO immediate command, unlike just about every other variant of the hardware. Also document some magic values and fix some minor nearby whitespace.
MFC After: 3 days
|
151222 |
10-Oct-2005 |
scottl |
Fix a missing set of lock operations.
Submitted by: green PR: 87191
|
151109 |
08-Oct-2005 |
scottl |
Ue a better msleep identifier. Fix some whitespace.
|
151108 |
08-Oct-2005 |
scottl |
aac_intr0 rotted long ago, remove it.
|
151086 |
08-Oct-2005 |
scottl |
Mega Update to the aac driver to support a whole new family of cards and the modified interface that they use. Changes include:
- Register a different interrupt handler for the new interface. This one is INTR_MPSAFE, not INTR_FAST, and directly processes completions and AIFs. - Add an event registration and callback mechanism for the ioctl and CAM modules can know when a resource shortage clears. This condition was previously fatal in CAM due to programming oversights. - Fix locking to play better with newbus. - Provide access methods for talking to cards with the NEWCOMM interface. - Fix up the CAM module to be better suited for dealing with newer firmware on the PERC Si/Di series that requires talking to plain SCSI via aac. - Add a whole slew of new PCI Id's.
Thanks to Adaptec for providing an initial version of this work and for answering countless questions about it. There are still some rough edges in this, but it works well enough to commit and test for now.
Obtained from: Adaptec, Inc.
|
150120 |
14-Sep-2005 |
scottl |
Bring aac_cam into line with using time_uptime instead of time_second.
|
150119 |
14-Sep-2005 |
scottl |
Use time_uptime for timing commands instead of time_second. This is a bit risky because the "current time" is supposed to be fed to the card during initialization, and the current time is supposed to be put into each command that is sent to the card. Hopefully either the card doesn't actually care about the timestamps, or it doesn't care about the absolute values so long and the relative values are consistent. Not an MFC candidate until more thorough testing can be done.
|
148866 |
08-Aug-2005 |
ps |
Add support for HP branded 2610SA
MFC after: 3 days Approved by: scottl
|
148852 |
08-Aug-2005 |
scottl |
Retire the FreeBSD 4.x compat code and __FreeBSD_version checks from the aac driver.
|
147998 |
14-Jul-2005 |
scottl |
Check the vendor and device, not subvendor and subdevice, when looking for channel devices. This should fix Dell 2450/2550/2650 systems that have RAID enabled. This will likely not fix 2400 systems though as I don't have the appropriate PCI Id info for them.
MFC After: 3 day
|
146851 |
01-Jun-2005 |
scottl |
Add a text description for the Intel IOP302/303 processors. Be slightly more verbose about the allocation of RAM on the controller.
Sbumitted by: Jeremy Chadwick PR: kern/81259 MFC-After: 3 days
|
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)
|
145811 |
02-May-2005 |
scottl |
Fix some busdma API violations in the dumpsys handler.
MFC After: 3 days
|
144166 |
26-Mar-2005 |
sam |
purge dead code
Noticed by: Coverity Prevent analysis tool
|
143838 |
19-Mar-2005 |
scottl |
Handle failures better in the passthrough bus creation code.
Submitted by: Coverity Prevent analysis tool
|
143164 |
05-Mar-2005 |
imp |
Use BUS_PROBE_DEFAULT for pci probe return value
|
141567 |
09-Feb-2005 |
scottl |
Remove the messy locking dance around xpt_done()
|
140669 |
23-Jan-2005 |
scottl |
Fix whitespace
|
139836 |
07-Jan-2005 |
scottl |
Add a default driver to attach to the "hidden" scsi channels of the Dell PERC 3 controllers. This is needed to keep the PM code from powering them down.
|
139749 |
06-Jan-2005 |
imp |
Start each of the license/copyright comments with /*-, minor shuffle of lines
|
138884 |
15-Dec-2004 |
scottl |
Add the PCI ID for the Adaptec 2230SLP card.
Submitted by: Ray Gilstrap
|
138635 |
09-Dec-2004 |
scottl |
Complete the repo-copy of aac_ioctl.h from sys/dev/aac/to sys/sys.
|
137962 |
21-Nov-2004 |
scottl |
Don't force busdma to pre-allocate bounce pages for static allocations.
|
136756 |
21-Oct-2004 |
scottl |
Add support for the 21610SA 16-channel SATA card. Thanks to Adaptec for providing hardware for testing.
|
135289 |
16-Sep-2004 |
scottl |
If the timeout handler runs and notices that commands are timed out, check the firmware status register on the card to see if the firmware is still running. There is no way to recover from this, but at least it can give a hint as whether the car has crashed (which happens all too often).
MFC after: 3 days
|
135095 |
12-Sep-2004 |
scottl |
Put some of the probe messages under bootverbose so to lessen the noise.
|
133606 |
13-Aug-2004 |
scottl |
Add support for the Adaptec RAID-On-Chip architecture. This in turn provides support for the Adaptec 2130S adapter. Thanks to Adaptec for providing hardware for this.
|
133542 |
12-Aug-2004 |
scottl |
Destroy mutexes on detach.
|
133541 |
12-Aug-2004 |
scottl |
Change FREE() to free()
|
133540 |
12-Aug-2004 |
scottl |
Remove the AAC_LOCK macros. They no longer abstract anything and only obfuscate the code. No functional differences.
|
133539 |
12-Aug-2004 |
scottl |
Release the sync fib after the controller has been shut down. This also releases the I/O lock instead of just leaking it.
|
132771 |
28-Jul-2004 |
kan |
Avoid casts as lvalues.
|
130585 |
16-Jun-2004 |
phk |
Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly.
|
130419 |
13-Jun-2004 |
obrien |
Cast printf'ed values to intmax_t.
|
130006 |
02-Jun-2004 |
scottl |
Collapse sync fib locking into normal i/o locking. The former didn't protect the registers so it was trivially possible for a sync command and i/o command to fight each other and confuse the controller. Make the sync fib alloc/release functions inline and remove the somewhat worthless AAC_SYNC_LOCK_FORCE flag. Thanks to Adil Katchi for helping me to track this down in RELENG_4.
|
129946 |
01-Jun-2004 |
scottl |
Commit the correct version of the patch from last night. This fixes an immediate panic when doing any i/o, and it closes a completion race.
|
129923 |
01-Jun-2004 |
scottl |
Collapse aac_map_command() into aac_startio(). Check the AAC_QUEUE_FRZN in every iteration of aac_startio(). This ensures that a command that is deferred for lack of resources doesn't immediately get retried in the aac_startio() loop. This avoids an almost certain livelock.
|
129884 |
30-May-2004 |
scottl |
Turn down the queue size by 8 until I can figure out why the 512th command keeps on getting lost.
|
129879 |
30-May-2004 |
phk |
Add missing <sys/module.h> includes
|
129186 |
13-May-2004 |
des |
Unbreak the build.
|
129185 |
13-May-2004 |
scottl |
Enable INTR_ENTROPY if the interrupt is not set to INTR_FAST. Remove the testing and setting of the INTR_ENTROPY macro as it is not needed in FreeBSD 5.x.
Submitted by: Alex Vasylenko
|
128258 |
14-Apr-2004 |
scottl |
Remove the 'timeout' argument from aac_wait_command() as it isn't used and never will be. Update the XXX comment for this function to accurately reflect why things are the way they are.
|
127242 |
20-Mar-2004 |
scottl |
Don peril-sensitive sunglasses and add PCI Id's for two new cards. I've only done minimal testing on one of these cards and the firmware folks have been extremely uncooperative in answering my qeustions about them, so hopefully they will work ok for everyone.
|
127135 |
17-Mar-2004 |
njl |
Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
|
126674 |
05-Mar-2004 |
jhb |
kthread_exit() no longer requires Giant, so don't force callers to acquire Giant just to call kthread_exit().
Requested by: many
|
126219 |
25-Feb-2004 |
scottl |
Revert the last commit. I don't know what I was thinking, but this change definitely doesn't help any thing.
|
126080 |
21-Feb-2004 |
phk |
Device megapatch 4/6:
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.
|
126059 |
21-Feb-2004 |
scottl |
Fix a major brain-o. If the command needs to be put on the deferred queue, take it off of the busy queue first. This should fix the 'command is on another queue' panic that showed up recently.
|
125975 |
18-Feb-2004 |
phk |
Change the disk(9) API in order to make device removal more robust.
Previously the "struct disk" were owned by the device driver and this gave us problems when the device disappared and the users of that device were not immediately disappearing.
Now the struct disk is allocate with a new call, disk_alloc() and owned by geom_disk and just abandonned by the device driver when disk_create() is called.
Unfortunately, this results in a ton of "s/\./->/" changes to device drivers.
Since I'm doing the sweep anyway, a couple of other API improvements have been carried out at the same time:
The Giant awareness flag has been flipped from DISKFLAG_NOGIANT to DISKFLAG_NEEDSGIANT
A version number have been added to disk_create() so that we can detect, report and ignore binary drivers with old ABI in the future.
Manual page update to follow shortly.
|
125616 |
09-Feb-2004 |
scottl |
Fall back to INTR_MPSAFE if INTR_FAST registration fails.
PR: kern/62276
|
125576 |
07-Feb-2004 |
scottl |
Remove the use of AACQ_COMPLETE here since there is no longer a completion queue.
|
125574 |
07-Feb-2004 |
scottl |
Do some small cleanups to comments and remove AACQ_COMPLETE definitions since the completion queue is long-gone.
|
125560 |
07-Feb-2004 |
scottl |
Remove the hack of lowering AAC_MAX_FIB now that the root cause of the problem was found.
|
125559 |
07-Feb-2004 |
scottl |
If a command has to be deferred because there are no more resources for it on the card, unmap it first. This allows it to be picked up properly when the queue gets kicked again. This was the root problem for the lost command (i.e. stuck in getblk/vinvalb) problem. While here, panic if commands don't map correctly instead of just silently ignoring the problem and dropping command. Also slow down the dynamic allocation of new commands.
It should be safe to go back into the aac waters. Thanks to everyone who suffered through this and provided good feedback.
|
125543 |
07-Feb-2004 |
scottl |
Reduce AAC_MAX_FIBS to work around some yet-unidentified bugs in the handling of resources shortages. The driver is now so fast that it can completely fill all 512 slots on the card, but for some reason only 511 slots are being allocated. Anything that tries to go into the 512th slot gets silently lost. Both bugs need to be fixed at a later date, but this should fix the reports of hangs in getblk and vinvalb.
|
125542 |
07-Feb-2004 |
scottl |
- Broaden the scope of locking in aac_command_thread() again to catch some edge cases in the loop.
- Try to grab a command before dequeueing the bio from the bioq. The old behaviour of requeuing deferred bios to the end of the bioq is arguably wrong. This should be fixed in the future to check the bioq head without automatically dequeueing the bio.
|
125541 |
07-Feb-2004 |
scottl |
Add an #ifdef _KERNEL so that this file can be used from userland.
|
125511 |
06-Feb-2004 |
peter |
Make LINT compile on amd64
|
125225 |
30-Jan-2004 |
scottl |
Take the plunge and make this driver be INTR_FAST. This re-arranges the interrupt handler so that no locks are needed, and schedules the command completion routine with a taskqueue_fast. This also corrects the locking in the command thread and removes the need for operation flags.
Simple load tests show that this is now considerably faster than FreeBSD 4.x in the SMP case when multiple i/o tasks are running.
|
123128 |
03-Dec-2003 |
scottl |
Temporary workaround for aac_cam to deal with CAM requiring Giant. This should fix the panics on boot with newer Adaptec RAID cards.
Approved by: re (rwatson)
|
122352 |
09-Nov-2003 |
tanimura |
- Implement selwakeuppri() which allows raising the priority of a thread being waken up. The thread waken up can run at a priority as high as after tsleep().
- Replace selwakeup()s with selwakeuppri()s and pass appropriate priorities.
- Add cv_broadcastpri() which raises the priority of the broadcast threads. Used by selwakeuppri() if collision occurs.
Not objected in: -arch, -current
|
121828 |
01-Nov-2003 |
scottl |
Remove a bogus PCI ID entry.
|
121307 |
21-Oct-2003 |
silby |
Change all SYSCTLS which are readonly and have a related TUNABLE from CTLFLAG_RD to CTLFLAG_RDTUN so that sysctl(8) can provide more useful error messages.
|
121173 |
17-Oct-2003 |
scottl |
Fix a couple of bugs with AIF handling: - Correct the logic for the AIF array index pointers so that correct slot is always looked at. - Copy the full FIB payload size when copying AIF's, not just the first 64 bytes.
Thanks to Mirapoint, Inc, for pointing these problems out and offering a solution.
|
120576 |
29-Sep-2003 |
scottl |
Eliminate the use of a statically assign major number for the aac device.
|
120129 |
16-Sep-2003 |
scottl |
Correctly wrap the producer queue index when dequeuing commands. This wasn't a problem for command responses since we rarely ever filled the queue. However, adapter-initiated commands have a much smaller queue and could tickle this bug. It's possible that this might fix the recently reported problems with the aac-2120s, though I haven't been able to reproduce the problem locally.
MFC-After: 1 day
|
119908 |
09-Sep-2003 |
scottl |
Use PCIR_BAR() instead of a magic offset.
|
119659 |
01-Sep-2003 |
scottl |
Commands submitted through the management interface won't have scatter/ gather lists. Stop ignoring them and instead call the callback directly. This unbreaks the management interface.
|
119625 |
01-Sep-2003 |
scottl |
If ~ chars were pennies, I'd be pennyless. This should fix all of the 'command not in queue' panics. Also fix a nearby style problem.
|
119418 |
24-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor style cleanups.
|
119273 |
22-Aug-2003 |
imp |
Prefer the new location of dev/pci/pci*.h.
|
119171 |
20-Aug-2003 |
mux |
Fix build by correcting a wrong cast.
|
119146 |
19-Aug-2003 |
scottl |
Make aac(4) compile cleanly on 64-bit machines. The code was already 64-bit safe, but some (unneeded and/or harmless) downcasts were generating warnings. The driver still is not endian-clean.
|
118607 |
07-Aug-2003 |
jhb |
Consistently use the BSD u_int and u_short instead of the SYSV uint and ushort. In most of these files, there was a mixture of both styles and this change just makes them self-consistent.
Requested by: bde (kern_ktrace.c)
|
117363 |
09-Jul-2003 |
scottl |
Handle the EINPROGRESS case of bus_dmamap_load() for data buffers.
|
117362 |
09-Jul-2003 |
scottl |
Fix a missing } that got dropped from the last commit.
|
117361 |
09-Jul-2003 |
scottl |
Add a new quirk for cards that incorrectly interpret the amount of memory in the system. This might also have a small performance gain.
|
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
|
116553 |
19-Jun-2003 |
scottl |
Fixing some glaring problems with aac_disk_dump(). - Mark that it cannot handle greater than 4GB of RAM at this time. Fixing that will come later. Fail any attempts to dump above thati limit. - If a call to aac_disk_dump() needs to be split into multiple i/o's, increment the virtual offset after each i/o instead of just dumping the same offset over and over again. - Bail out if bus_dmamap_load() returns an error. Error recovery is likely not possible.
|
115760 |
03-Jun-2003 |
scottl |
When scanning for changed containers, don't assume that the controller will respond in a sane manner.
Thanks to Petri Helenius <pete@he.iki.fi> for spotting this and pestering me to fix it.
|
115409 |
30-May-2003 |
scottl |
Add support for the upcoming 2410SA card.
Approved by: re (telecon)
|
114151 |
28-Apr-2003 |
scottl |
Don't pass pointers to kernel data structures through 32-bit fields as 64-bit architectures won't like this. Use virtual array indexes instead. This *should* allow the driver to work on 64-bit platforms, though it's still not endian clean.
|
112946 |
01-Apr-2003 |
phk |
Use bioq_flush() to drain a bio queue with a specific error code. Retain the mistake of not updating the devstat API for now.
Spell bioq_disksort() consistently with the remaining bioq_*().
#include <geom/geom_disk.h> where this is more appropriate.
|
112939 |
01-Apr-2003 |
phk |
Include <sys/conf.h> rather than trusting <sys/disk.h> to do so.
|
112856 |
30-Mar-2003 |
scottl |
Add the ability to send 64-bit scatter/gather elements to aac cards. This is enabled when both the size of bus_addr_t > 4 and the card claims support.
Don't wake up the kthread to allocate more commands if we know that we've already allocated the max number of commands.
|
112679 |
26-Mar-2003 |
scottl |
Begin support for 64-bit address support and workarounds for newer cards: - Add data structuress for doing 64-bit scatter/gather - Move busdma tag creations around so that only the parent is created in aac_pci.c. - Retrieve the capabilities word from the firmware before setting up command structures and tags. This allows the driver to decide whether to do 64-bit commands, and if work-arounds are needed for systems with >2GB of RAM. - Only enable the SCSI passthrough if it's enabled in the capabilities word in the firmware.
This should fix problems with the 2120S and 2200S cards in systems with more than 2GB of RAM. Full 64-bit support is forthcoming.
MFC-After: 1 week
|
112207 |
13-Mar-2003 |
scottl |
Now that bus_dmamem_alloc() handles its Giant mutex requirements itself, don't bother doing the same in the code that calls it.
|
111979 |
08-Mar-2003 |
phk |
Centralize the devstat handling for all GEOM disk device drivers in geom_disk.c.
As a side effect this makes a lot of #include <sys/devicestat.h> lines not needed and some biofinish() calls can be reduced to biodone() again.
|
111815 |
03-Mar-2003 |
phk |
Gigacommit to improve device-driver source compatibility between branches:
Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values.
This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386.
Approved by: re(scottl)
|
111691 |
01-Mar-2003 |
scottl |
The aac driver has evolved enough over the last few months that it no longer resembles the 4.x version very much. Garbage collect the legacy bits.
|
111532 |
26-Feb-2003 |
scottl |
Bring aac out from under Giant: - the mutex aac_io_lock protects the main codepaths which handle queues and hardware registers. Only one acquire/release is done in the top-half and the taskqueue. This mutex also applies to the userland command path and CAM data path. - Move the taskqueue to the new Giant-free version. - Register the disk device with DISKFLAG_NOGIANT so the top-half processing runs without Giant. - Move the dynamic command allocator to the worker thread to avoid locking issues with bus_dmamem_alloc().
This gives about 20% improvement in most of my benchmarks.
|
111528 |
26-Feb-2003 |
scottl |
Introduce a new taskqueue that runs completely free of Giant, and in turns runs its tasks free of Giant too. It is intended that as drivers become locked down, they will move out of the old, Giant-bound taskqueue and into this new one. The old taskqueue has been renamed to taskqueue_swi_giant, and the new one keeps the name taskqueue_swi.
|
111527 |
26-Feb-2003 |
scottl |
Use BUS_SPACE_MAXADDR_32BIT in the DMA tag where needed. Before the recent fix to BUS_SPACE_MAXADDR, we were probably bouncing quite a bit =-(
|
111525 |
26-Feb-2003 |
scottl |
Move to 'struct disk*' API
Submitted by: phk
|
111220 |
21-Feb-2003 |
phk |
NO_GEOM cleanup:
Retire the "d_dump_t" and use the "dumper_t" type instead.
Dumper_t takes a void * as first arg which is more general than the dev_t taken by d_dump_t. (Remember: we could have net-dumpers if somebody wrote us one!)
Define the convention for GEOM controlled disk devices to be that the first argument to the dumper function is the struct disk pointer.
Change device drivers accordingly.
|
111216 |
21-Feb-2003 |
phk |
NO_GEOM cleanup:
Change the argument to disk_destroy() to be the same struct disk * as disk_create() takes.
This enables drivers to ignore the (now) bogus dev_t which disk_create() returns.
|
111196 |
20-Feb-2003 |
scottl |
On detach, don't remove the child from our list of children unless it has successfully detached.
|
111172 |
20-Feb-2003 |
scottl |
The completion queue is no longer used, so nuke its associated code and data structures.
|
111152 |
19-Feb-2003 |
scottl |
Fix a 64-bit bogon. The hardware command structure only has one 32 bit field for holding driver-dependant data. Instead of putting the pointer to the driver command struct in there, take advantage of these structs being a (virtually) contiguous array and just put the array index in the field.
|
111143 |
19-Feb-2003 |
scottl |
Make the aac driver be INTR_MPSAFE. Once the interrupt handler determines that a command completion happened, all further processing is deferred to a taskqueue. The taskqueue itself runs implicetely under Giant, but we already used a taskqueue for the biodone() processing, so this at least saves the contesting of Giant in the interrupt handler.
|
111141 |
19-Feb-2003 |
scottl |
o Move the cleanup of the fib maps into aac_free_commands() so as to retain symetry with aac_alloc_commans(). Since aac_alloc_commands() allocates fib maps and places them onto the fib lists, aac_free_commands() should reverse those operations.
o Combine two ifs with the same body with an ||.
o Switch from uintptr_t to uint32_t for fib map load operations. The target is a uint32_t so using this type for the map load call avoids an extra cast. uintptr_t should only be used when you need an "int sized the same as the machine's poitner size" which is not the case here.
o Removed the commented out M_WAITOK flag in the allocation in aac_alloc_commands(). The kernel will only block in the allocator if it can grow the size of the kernel. This usually results in a page-out which could involve this aac device. Thus, sleeping here could deadlock the machine. Assuming this operation is occurring outside of attach time, we have enough fibs to operate anyway, so waiting for fibs to free up is okay if not optimal.
o In aac_alloc_commands(), if we cannot dmamem_alloc additional fib space, free the fib map.
o In aac_alloc_commands(), if we cannot create per-command dmamaps, don't lose track of the fib map that is mapping all of the commands that we have already released into the free pool. Instead, just cut out of the loop and modify aac_free_commands to not attempt to free maps that have not been allocated.
o Don't use a magic number when pre-allocating fibs.
o Use PAGE_SIZE to allocate in page sized chunks instead of an architecture specific constant.
Submitted by: gibbs
|
110604 |
10-Feb-2003 |
scottl |
Implement a new dynamic command allocator. FIBs are allocated in 1 page blocks now, which should eliminate problems with the driver failing to attach due to insufficient contiguous RAM. Allow the FIB pool to grow from the default of 128 to the max of 512 as demand grows. Also pad the adapter init struct to work around the 2120/2200 DMA bug now that there is no longer a FIB slab.
|
110432 |
06-Feb-2003 |
scottl |
Teach the CAM module how to deregister itself so it can be unloaded.
|
110428 |
06-Feb-2003 |
scottl |
Free the container and sim objects on detach. Convert several uses of MALLOC to malloc.
|
110427 |
06-Feb-2003 |
scottl |
Don't include aac_cam.h, since it was nuked in the last commit. Deregister the shutdown eventhandler on unload.
|
110426 |
05-Feb-2003 |
scottl |
Various cleanups: - Move the command timeout check from a separate repeating timeout to the kthread since the kthread is already running periodically. - Move printing the hardware print buffer to the kthread. - Properly shut down the kernel thread on detach. - Detach the child array devices on detach. - Don't issue a controller halt command on detach. Doing so requires a PCI reset to wake the controller back up. The driver can now be unloaded as long as CAM support is not enabled.
|
109716 |
23-Jan-2003 |
scottl |
Hack around a bug in the 2200 and 2120 controllers that connot DMA commands from below the first 8K of physical memory. A better fix is to modify the busdma api to allow either inclusion ranges or multiple exclusion ranges, but that debate is for another day.
MFC After: 2 days
|
109208 |
13-Jan-2003 |
scottl |
Since reseting the SCSI busses via the passthrough interface usually confuses the controller, tell CAM not to do it. Also report the correct error condition to CAM when it tries to probe a target that doesn't exists. This should make the CAM interface less risky to use.
MFC After: 3 days
|
109088 |
11-Jan-2003 |
scottl |
Major bugfixes for large memory and fast systems.
aac.c: Re-arrange the interrupt handler to optimize the common case of the adapter interrupting us because one or more commands are complete, and do a read across the pci bus to ensure that all posted status writes are flushed. This should close a race that could cause command completion interrupts to be lost. Follow the spec a bit closer when filling out command structures. Enable the Fast Response feature to eliminate the need for the card to DMA successfull command completions back into host memory. Tell the controller how much physical memory we have. Without this there was a chance that our DMA regions would collide with the memory window used by the cache on the controller. The result would be massive data corruption. This seemed to mainly affect systems with >2GB of memory. Fix a few whitespace problems.
aac_debug.c: Add an extra diagnostic when printing out commands.
aac_disk.c: Add extra sanity checks.
aacreg.h: Prepare for making this 64-bit clean by reducing the use of enumeration types in structures.
Many thanks to Justin Gibbs for helping track these down.
|
108329 |
27-Dec-2002 |
rwatson |
Use OPERATOR instead of WHEEL for make_dev(), use 0640 instead of 0644 for disk devices to be consistent with other storage devices.
Submitted by: kris Reviewed by: scottl
|
107797 |
12-Dec-2002 |
scottl |
sable the CAM interface on some more cards. It seemed to be confusing and upsetting the firmware there.
Thanks to imp@freebsd.org for suffering through testing with this.
Approved by: re
|
105528 |
20-Oct-2002 |
phk |
Fix mis-indentation.
Approved by: scottl
|
104354 |
02-Oct-2002 |
scottl |
Some kernel threads try to do significant work, and the default KSTACK_PAGES doesn't give them enough stack to do much before blowing away the pcb. This adds MI and MD code to allow the allocation of an alternate kstack who's size can be speficied when calling kthread_create. Passing the value 0 prevents the alternate kstack from being created. Note that the ia64 MD code is missing for now, and PowerPC was only partially written due to the pmap.c being incomplete there. Though this patch does not modify anything to make use of the alternate kstack, acpi and usb are good candidates.
Reviewed by: jake, peter, jhb
|
103952 |
25-Sep-2002 |
scottl |
The AAC_COMPAT_LINUX option was really annoying, since it made the aac driver dependent on the linux emulation module. This was especially bad for the release engineers who tried to move the aac driver from the kernel onto the drivers floppy. The linux compat bits for this driver are now in their own driver, aac_linux. It can be loaded as a module or compiled into the kernel. For the latter case, the AAC_COMPAT_LINUX option is needed, along with the COMPAT_LINUX option.
I've tested this in every configuration I can think of. This is an MFC candidate for 4.7.
Idea from: rwatson MFC after: 3 days
|
103870 |
23-Sep-2002 |
alfred |
use __packed.
|
103714 |
20-Sep-2002 |
phk |
(This commit touches about 15 disk device drivers in a very consistent and predictable way, and I apologize if I have gotten it wrong anywhere, getting prior review on a patch like this is not feasible, considering the number of people involved and hardware availability etc.)
If struct disklabel is the messenger: kill the messenger.
Inside struct disk we had a struct disklabel which disk drivers used to communicate certain metrics to the disklayer above (GEOM or the disk mini-layer). This commit changes this communication to use four explicit fields instead.
Amongst the benefits is that the fields do not get overwritten by wrong or bogus on-disk disklabels.
Once that is clear, <sys/disk.h> which is included in the drivers no longer need to pull <sys/disklabel.h> and <sys/diskslice.h> in, the few places that needs them, have gotten explicit #includes for them.
The disklabel inside struct disk is now only for internal use in the disk mini-layer, so instead of embedding it, we malloc it as we need it.
This concludes (modulus any mistakes) the series of disklabel related commits.
I belive it all amounts to a NOP for all the rest of you :-)
Sponsored by: DARPA & NAI Labs.
|
103675 |
20-Sep-2002 |
phk |
Make FreeBSD "struct disklabel" agnostic, step 311 of 723:
Rename diskerr() to disk_err() for naming consistency.
Drop the by now entirely useless struct disklabel argument.
Add a flag argument for new-line termination.
Fix a couple of printf-format-casts to %j instead of %l.
Correctly print the name of all bio commands.
Move the function from subr_disklabel.c to subr_disk.c, and from <sys/disklabel.h> to <sys/disk.h>.
Use the new disk_err() throughout, #include <sys/disk.h> as needed.
Bump __FreeBSD_version for the sake of the aac disk drivers #ifdefs.
Remove unused disklabel members of softc for aac, amr and mlx, which seem to originally have been intended for diskerr() use, but which only rotted and got Copy&Pasted at least two times to many.
Sponsored by: DARPA & NAI Labs.
|
102602 |
30-Aug-2002 |
scottl |
The aac driver needs 256K of contiguous physical memory in order to attach. If it can't get that (highly likely if loaded as a module on a system that's been up for a while), give a more descriptive error message. Also clean up some nearby style nits.
MFC after: 2 days
|
102003 |
17-Aug-2002 |
rwatson |
In continuation of early fileop credential changes, modify fo_ioctl() to accept an 'active_cred' argument reflecting the credential of the thread initiating the ioctl operation.
- Change fo_ioctl() to accept active_cred; change consumers of the fo_ioctl() interface to generally pass active_cred from td->td_ucred. - In fifofs, initialize filetmp.f_cred to ap->a_cred so that the invocations of soo_ioctl() are provided access to the calling f_cred. Pass ap->a_td->td_ucred as the active_cred, but note that this is required because we don't yet distinguish file_cred and active_cred in invoking VOP's. - Update kqueue_ioctl() for its new argument. - Update pipe_ioctl() for its new argument, pass active_cred rather than td_ucred to MAC for authorization. - Update soo_ioctl() for its new argument. - Update vn_ioctl() for its new argument, use active_cred rather than td->td_ucred to authorize VOP_IOCTL() and the associated VOP_GETATTR().
Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
|
101649 |
10-Aug-2002 |
scottl |
Fix GET_TRAN_SETTINGS to be more correct. Don't allow SCSI resets on the 5400S card, it seems to cause problems with certain backplanes.
Submitted by: lnb@freebsdsystems.com MFC after: 3 days
|
97215 |
24-May-2002 |
peter |
Fix deprecated use of label at end of compound statement
|
97214 |
24-May-2002 |
peter |
Constify a debug function arg that we pass __func__ to in order to pacify gcc-3.1's 'const char *__func__;'
|
96755 |
16-May-2002 |
trhodes |
More s/file system/filesystem/g
|
96440 |
12-May-2002 |
scottl |
Update the PCI table as per Dell's fickleness.
MFC after: 3 days
|
95966 |
03-May-2002 |
scottl |
bzero out the sync command buffer when sending commands. This was causing problems when enumerating multiple arrays.
This is an MFC candidate.
|
95827 |
30-Apr-2002 |
scottl |
Fix a bug where the aacp device would only talk to bus 0 on the controller.
|
95536 |
27-Apr-2002 |
scottl |
Add a CAM interface to the aac driver. This is useful in case you should ever connect a SCSI Cdrom/Tape/Jukebox/Scanner/Printer/kitty-litter-scooper to your high-end RAID controller. The interface to the arrays is still via the block interface; this merely provides a way to circumvent the RAID functionality and access the SCSI buses directly. Note that for somewhat obvious reasons, hard drives are not exposed to the da driver through this interface, though you can still talk to them via the pass driver. Be the first on your block to low-level format unsuspecting drives that are part of an array!
To enable this, add the 'aacp' device to your kernel config.
MFC after: 3 days
|
95350 |
24-Apr-2002 |
scottl |
Prepare for a major update to the aac driver: Update the aac driver with the new crashdump api. Protect sync fibs with a mutex. Align all DMA buffers on a PAGE_SIZE boundary.
MFC after: 3 days
|
94999 |
18-Apr-2002 |
scottl |
Add the PCI ID for an upcoming variant of a soon-to-be released series of cards.
|
93908 |
05-Apr-2002 |
scottl |
Add support for the Dell 2650
Submitted by: andrew_bachler@dell.com
|
93818 |
04-Apr-2002 |
jhb |
Change callers of mtx_init() to pass in an appropriate lock type name. In most cases NULL is passed, but in some cases such as network driver locks (which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.
Tested on: i386, alpha, sparc64
|
93699 |
02-Apr-2002 |
scottl |
Add support for the PERC3/Di found in the Dell 1650
Submitted by: mp
|
93495 |
31-Mar-2002 |
phk |
The AAC, TWE and IDA diskdrivers cannot dump until I and msmith have ripped all the i386 specific formatting code from their dump routines. Due to the potential for trashing disks, I did not want to do this "blind".
|
90597 |
13-Feb-2002 |
scottl |
Add ID's for a couple of upcoming cards.
MFC after: 1 day
|
90275 |
06-Feb-2002 |
scottl |
Don't attach to Dell PERC2/QC cards that have a firmware rev of 1.x. This check is complicated by the fact that the Adaptec 5400S cards claim to use 1.x firmware also. PERC2/QC 1.x firmware is not compatible with this driver and will cause a system hang.
MFC after: 3 days
|
89319 |
14-Jan-2002 |
alfred |
Replace ffind_* with fget calls.
Make fget MPsafe.
Make fgetvp and fgetsock use the fget subsystem to reduce code bloat.
Push giant down in fpathconf().
|
89316 |
13-Jan-2002 |
alfred |
Include sys/_lock.h and sys/_mutex.h to reduce namespace pollution.
Requested by: jhb
|
89306 |
13-Jan-2002 |
alfred |
SMP Lock struct file, filedesc and the global file list.
Seigo Tanimura (tanimura) posted the initial delta.
I've polished it quite a bit reducing the need for locking and adapting it for KSE.
Locks:
1 mutex in each filedesc protects all the fields. protects "struct file" initialization, while a struct file is being changed from &badfileops -> &pipeops or something the filedesc should be locked.
1 mutex in each struct file protects the refcount fields. doesn't protect anything else. the flags used for garbage collection have been moved to f_gcflag which was the FILLER short, this doesn't need locking because the garbage collection is a single threaded container. could likely be made to use a pool mutex.
1 sx lock for the global filelist.
struct file * fhold(struct file *fp); /* increments reference count on a file */
struct file * fhold_locked(struct file *fp); /* like fhold but expects file to locked */
struct file * ffind_hold(struct thread *, int fd); /* finds the struct file in thread, adds one reference and returns it unlocked */
struct file * ffind_lock(struct thread *, int fd); /* ffind_hold, but returns file locked */
I still have to smp-safe the fget cruft, I'll get to that asap.
|
89112 |
09-Jan-2002 |
msmith |
Staticise the aac devclass.
|
87605 |
10-Dec-2001 |
obrien |
I missed a string concatenation.
|
87599 |
10-Dec-2001 |
obrien |
Update to C99, s/__FUNCTION__/__func__/, also don't use ANSI string concatenation.
|
87333 |
04-Dec-2001 |
scottl |
MFS: Use correct terminology for RAID 0/1 and 0/5.
|
87329 |
04-Dec-2001 |
scottl |
BAH! Missed another change to this file.
|
87326 |
04-Dec-2001 |
scottl |
Bah, I missed this file on the last commit
|
87310 |
03-Dec-2001 |
scottl |
Use d_thread_t to reduce diffs between current and stable. Spell ACQUIRE correctly.
|
87183 |
02-Dec-2001 |
scottl |
Add functionality and fix bugs so the driver will work with soon-to-be released management apps.
1. Implement poll(). This will check for queued aif's so that a subsequent ioctl call to retrieve the next aif will not block. 2. Don't catch signals when sleeping on a fib sent from userland. This causes a race and panic due to the pthread context switcher waking up the tsleep at inopportune times. 3. Fix some whitespace nits.
MFC after: 3 days
|
86313 |
13-Nov-2001 |
ps |
Fix a signed bug in the crashdump code for systems with > 2GB of ram.
Reviewed by: peter
|
85560 |
26-Oct-2001 |
jhb |
- Change the taskqueue locking to protect the necessary parts of a task while it is on a queue with the queue lock and remove the per-task locks. - Remove TASK_DESTROY now that it is no longer needed. - Go back to inlining TASK_INIT now that it is short again.
Inspired by: dfr
|
85521 |
26-Oct-2001 |
jhb |
Add locking to taskqueues. There is one mutex per task, one mutex per queue, and a mutex to protect the global list of taskqueues. The only visible change is that a TASK_DESTROY() macro has been added to mirror the TASK_INIT() macro to destroy a task before it is free'd.
Submitted by: Andrew Reiter <awr@watson.org>
|
83366 |
12-Sep-2001 |
julian |
KSE Milestone 2 Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
|
83136 |
06-Sep-2001 |
scottl |
Don't use a silly test to define INTR_ENTROPY.
Submitted by: peter
|
83114 |
05-Sep-2001 |
scottl |
Bring the aac driver *much* closer to style(9).
Reviewed by: ken
|
82856 |
03-Sep-2001 |
scottl |
Sigh. There are actually two ioctls ranges that need to be watched on the linux side. This will all be over soon...
|
82830 |
02-Sep-2001 |
scottl |
Work around a bug where the driver's copy of the disklabel gets corrupted and causes diskerr() to panic.
|
82829 |
02-Sep-2001 |
scottl |
Restrict the range of linux ioctls we will accept.
|
82567 |
30-Aug-2001 |
scottl |
Doh! Fix a comma that disappeared along the way.
Pointy-hat by: peter
|
82527 |
29-Aug-2001 |
scottl |
Mega update to the aac driver. 1. Correctly handle commands initiated by the adapter. These commands are defered to a kthread responsible for their processing, then are properly returned to the controller. 2. Add/remove disk devices when notified by the card that a container was created/deleted/offline. 3. Implement crashdump functionality. 4. Support all ioctls needed for the management CLI to work. The linux version of this app can be found at the Dell or HP website. A native version will be forthcoming.
MFC-after: 4.4-RELEASE
|
81851 |
17-Aug-2001 |
scottl |
Clarify the description string for one of the StrongARM based cards.
|
81254 |
07-Aug-2001 |
scottl |
Adding missing () in a KASSERT format string.
Submitted by: brandt@fokus.gmd.de
|
81216 |
06-Aug-2001 |
scottl |
Make AAC_COMPAT_LINUX optional once again.
Submitted by: julian
|
81189 |
06-Aug-2001 |
scottl |
Put the linux compat ioctl interface on death row. Add FreeBSD definitions of all of the ioctls, plus round out all ioctl definitions to match what exists for linux. Allow ioctls to be called through either the native or linux interface, though no apps exist (yet) that can take advantage of native calling.
|
81188 |
06-Aug-2001 |
scottl |
Missed this one in my 80-column sweep.
|
81154 |
05-Aug-2001 |
scottl |
Once again throw out the calculation of si_iosize_max and set it to 64K. Although it can go higher, it is not safe to so do on arrays with many members. Compromise by adding a tunable, "hw.aac.iosize_max" that can be set at boottime. Also document in the aac(4) manpage.
MFC after: 4 weeks
|
81151 |
05-Aug-2001 |
scottl |
Bugfixes. Close a race and logic bug in the timeout handling, don't call the interrupt handler from the upper half, etc. This fixes some serious stability problems that we were seeing on our production server. These patches have been tested for almost 6 months and are a highly recommended MFC candidate.
Reviewed by: gibbs, merry, msmith MFC after: 4 days
|
81150 |
05-Aug-2001 |
scottl |
Fix a couple of copyright issues and an 80 column nit that I missed before
|
81082 |
03-Aug-2001 |
scottl |
Reformat for 80 columns. Sorry, but I had to do it.
|
80359 |
25-Jul-2001 |
scottl |
Add /dev/hpn? as an alias to /dev/aac? so that the HP version of the CLI utility will work, and document it in the manpage.
MFC after: 3 days
|
80131 |
22-Jul-2001 |
msmith |
Add another Dell 3/Di PCI ID. You'd think they had enough of these already...
|
76324 |
06-May-2001 |
phk |
Make the disk mini-layer check for and handle zero-length transfers instead of the underlying drivers.
|
75994 |
26-Apr-2001 |
msmith |
More new Dell PCI IDs.
Submitted by: "Marty Moll" <martym@arbor.edu>
|
75991 |
26-Apr-2001 |
msmith |
The PERC 3/Di in the Dell PowerEdge 2250 has a new subdevice ID.
Submitted by: Chris Csanady <cc@ameslab.gov>
|
74810 |
26-Mar-2001 |
phk |
Send the remains (such as I have located) of "block major numbers" to the bit-bucket.
|
74661 |
22-Mar-2001 |
scottl |
Create /dev/afaN as a symlink to /dev/aacN. This allows the CLI tools from Dell and HP to run.
Reviewed by: msmith
|
74604 |
21-Mar-2001 |
scottl |
Back out rev 1.4. The advertised 64K limit on transfers only applies when using 64bit S/G entries. With this reverted, we are seeing >92MB/sec reads and >42MB/sec writes on a RAID-5 container.
|
74374 |
17-Mar-2001 |
gibbs |
This is an MFC candidate.
Add the AAC_DEBUG option to enable debugging in the aac driver.
Correct a race condition in the interrupt handler where the controller may queue a fib to a response queue after the driver has serviced the queue but before the interrupt is cleared. This could leave a completed fib stranded in the response queue unless another I/O completed and generated another interrupt.
Reviewed by: msmith
|
74365 |
16-Mar-2001 |
msmith |
Fix a typo which would cause containers between 1GB and 2GB to have the wrong geometry reported.
Submitted by: mark tinguely <tinguely@web.cs.ndsu.NoDak.edu>
|
73948 |
07-Mar-2001 |
scottl |
Set si_iosize_max to 64K, even though the adapter seems to be able to do more. This puts us safely in line with Adaptec documentation and shouldn't really affect anything.
MFC candidate for 4.3
|
73280 |
01-Mar-2001 |
markm |
Turn on interrupt-entropy harvesting for all/any mass storage devices I could find. I have no doubt missed a couple.
Interrupt entropy harvesting is still conditional on the kern.random.sys.harvest_interrupt sysctl.
|
71458 |
23-Jan-2001 |
jhb |
Kill a warning by marking an unused function with __unused.
|
70875 |
10-Jan-2001 |
msmith |
Remove a mismatched splbio() in aac_start (the called functions each protect themselves correctly).
Submitted by: ps
|
70393 |
27-Dec-2000 |
msmith |
Major bugfix and minor update. This should resolve the current issues with the driver locking up under load.
- Restructure so that we use a static pool of commands/FIBs, rather than allocating them in clusters. The cluster allocation just made things more complicated, and allowed us to waste more memory in peak load situations. - Make queueing macros more like my other drivers. This adds queue stats for free. Add some debugging to take advantage of this. - Reimplement the periodic timeout scan. Kick the interrupt handler and the start routine every scan as well, just to be safe. Track busy commands properly. - Bring resource cleanup into line with resource allocation. We should now clean up correctly after a failed probe/unload/etc. - Try to start new commands when old ones are completed. We weren't doing this before, which could lead to deadlock when the controller was full. - Don't try to build a new command if we have found a deferred command. This could cause us to lose the deferred command. - Use diskerr() to report I/O errors. - Don't bail if the AdapterInfo structure is the wrong size. Some variation seems to be normal. We need to improve our handing of 2.x firmware sets. - Improve some comments in an attempt to try to make things clearer. - Restructure to avoid some warnings.
|
68920 |
19-Nov-2000 |
scottl |
Disable calling timeout() when doing bio. It was causing more prolems than solving. This will be fixed for real soon.
|
68877 |
18-Nov-2000 |
dwmalone |
Further use of M_ZERO.
Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Approved by: msmith
|
67782 |
28-Oct-2000 |
msmith |
Return -10 from the PCI probe to allow room for an updated driver to override one built into the kernel.
|
67708 |
27-Oct-2000 |
phk |
Convert all users of fldoff() to offsetof(). fldoff() is bad because it only takes a struct tag which makes it impossible to use unions, typedefs etc.
Define __offsetof() in <machine/ansi.h>
Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h>
Remove myriad of local offsetof() definitions.
Remove includes of <stddef.h> in kernel code.
NB: Kernelcode should *never* include from /usr/include !
Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API.
Deprecate <struct.h> with a warning. The warning turns into an error on 01-12-2000 and the file gets removed entirely on 01-01-2001.
Paritials reviews by: various. Significant brucifications by: bde
|
67428 |
22-Oct-2000 |
scottl |
First attempt at timeouts for bio commands sent to the controller. No retry is attempted right now; the failure is merely passed up. This may help with the mysterious lockups seen by some with Pablano controllers.
|
67164 |
15-Oct-2000 |
phk |
Remove unneeded #include <machine/clock.h>
|
66578 |
03-Oct-2000 |
msmith |
Fix up some more comments that were reversed.
Submitted by: Niklas Hallqvist <niklas@appli.se>
|
66574 |
03-Oct-2000 |
msmith |
Fix reversed comments re: OISR/OIMR
Submitted by: Niklas Hallqvist <niklas@appli.se>
|
66478 |
30-Sep-2000 |
scottl |
Fix compiling with AAC_DEBUG.
|
66050 |
19-Sep-2000 |
msmith |
Include <sys/proc.h> so that we can dereference something in the proc structure. Looks like someone removed a nested include somewhere else.
Submitted by: gallatin, dg
|
65793 |
13-Sep-2000 |
msmith |
A new driver for PCI:SCSI RAID controllers based on the Adaptec FSA design. This includes integrated Dell RAID controllers, the Dell PERC 2/QC and the HP NetRAID-4M.
|