Commit Graph

36 Commits

Author SHA1 Message Date
Xin LI
add5afdc93 Workaround build for PAE case for now - revert the PHYS
case to previous panic behavior.

I have a real fix that changes the sg dma tag allocation
to be limited to the under 4GB address space but would
prefer to have review before committing.
2010-11-14 05:05:41 +00:00
Xin LI
231c8b7113 Update to vendor release 1.20.00.19.
Bug fixes:
  * Fixed "inquiry data fails comparion at DV1 step"
  * Fixed bad range input in bus_alloc_resource for ADAPTER_TYPE_B
  * Fixed arcmsr driver prevent arcsas support for Areca SAS HBA ARC13x0

Many thanks to Areca for continuing to support FreeBSD.

This commit is intended for MFC before 8.2-RELEASE.

Submitted by:   Ching-Lung Huang <ching2048 areca com tw>
2010-11-13 08:58:36 +00:00
Xin LI
d74001ad8d Apply vendor version 1.20.00.17.
This version adds support for ARC1880; additionally this version fixed
an issue where all devices on a SAS port gets offlined when any device
failed on the port [1].

Many thanks to Areca for continuing to support FreeBSD.

PR:		kern/148502 [1]
Submitted by:	Ching-Lung Huang <ching2048 areca com tw>
Obtained from:	Areca
Tested by:	Rich Ercolani <rercola acm jhu edu> [1]
MFC after:	2 weeks
2010-07-21 18:50:24 +00:00
Martin Blapp
c2ede4b379 Remove extraneous semicolons, no functional changes.
Submitted by:	Marc Balmer <marc@msys.ch>
MFC after:	1 week
2010-01-07 21:01:37 +00:00
Xin LI
641182ba04 Initialize the whole message unit's DMA buffer to zero, this fixes a panic
during boot when ARC1200 is being used with certain motherboard models.

This commit brings the driver to the same state of vendor's 1.20.00.16
release.  Many thanks to Areca for their continued support to FreeBSD.

Reported by:	Jirka Mikulas <jiri mikulas com>
Submitted by:	Erich Chen (Areca)
Obtained from:	ftp://ftp.areca.com.tw/RaidCards/AP_Drivers/FreeBSD/DRIVER/SourceCode/arcmsr-freebsd-1.20.00.16-91010.zip
MFC after:	3 days
2009-11-09 07:28:29 +00:00
Warner Losh
00b4e54ae7 We no longer need to use d_thread_t, migrate to struct thread *. 2009-05-20 17:29:21 +00:00
Scott Long
9d98ff4d69 Tell CAM that SPI disconnect works, which in turn will let it use tags.
This fixes the low "max device openings" count that has lead to poor
performance in FreeBSD 7.0 and 7.1.

Extra thanks goes to Mike Tancsa at Sentex for providing a debug system for
this.
2009-02-20 07:40:54 +00:00
Warner Losh
f2aa0e9f88 fix arcmsr_attach, probe, detach, and shutdown prototypes to match newbus. 2009-02-10 22:46:36 +00:00
Ed Schouten
6bfa9a2d66 Replace all calls to minor() with dev2unit().
After I removed all the unit2minor()/minor2unit() calls from the kernel
yesterday, I realised calling minor() everywhere is quite confusing.
Character devices now only have the ability to store a unit number, not
a minor number. Remove the confusion by using dev2unit() everywhere.

This commit could also be considered as a bug fix. A lot of drivers call
minor(), while they should actually be calling dev2unit(). In -CURRENT
this isn't a problem, but it turns out we never had any problem reports
related to that issue in the past. I suspect not many people connect
more than 256 pieces of the same hardware.

Reviewed by:	kib
2008-09-27 08:51:18 +00:00
Scott Long
f40b4cabee Fix an incorrect FreeBSD version test. 2007-12-09 19:24:27 +00:00
Scott Long
579ec1a53f Modify locking so that a single version of the driver src can be used on 6.x
and beyond.
2007-12-09 19:22:25 +00:00
Scott Long
44f05562de Support new ARC120x family of controllers. Many thanks for Areca's continued
support of FreeBSD.

Submitted by: Erich Chen @ Areca
2007-12-08 20:48:26 +00:00
Scott Long
5878cbeccf Make the driver fully MPSAFE. This fixes some serious locking problems
that could cause panics and corruption under moderate load.  Many thanks
to Matt Reimer, Tom McDonald, and the rest of the guys at VPOP.net for
their help in identifying and testing this.

Approved by: re
2007-07-31 20:16:50 +00:00
Scott Long
b50569b71d 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.
2007-06-17 05:55:54 +00:00
Scott Long
2b83592fdc 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.
2007-04-15 08:49:19 +00:00
Scott Long
15735bec61 Freeze the simq, not the devq, if we run out of command slots. This fixes
the last round of reported instability in the rev 13/14 driver.

Approved by: Erich Chen
2007-04-02 03:31:37 +00:00
Matt Jacob
46a7789ea6 Forced commit to note that the previous CVS comment is
incorrect. The MODULE_DEPENDS lines were put in (by me)
in 1.14 and removed in 1.15. The facts should be correctly
reported.
2007-03-12 05:10:29 +00:00
Scott Long
d3cf342ddb Add back in MODULE_DEPEND() lines that were lost in the rev 13 update. 2007-03-12 05:02:42 +00:00
Scott Long
dc3a205bc4 Better fix for the errors under high load. Returning CAM_SCSI_BUSY is almost
never correct as CAM has no real understanding of it, and will just immediately
retry the command.  This leads to undesirable cycling of the camisr as well as
a high possibility for the command to exhaust its retries before the driver
can get around to servicing it.

The better fix, as demonstrated here, is to freeze the simq and mark the
command as needing to be tried.  Then when driver can service the command,
the simq gets unfrozen.  This is correct, and documented here to help reduce
the mystery.  However, it also points out a shortcoming in CAM error handling
that makes writing drivers harder.

Submitted by: Erich Chen
2007-03-06 01:12:15 +00:00
Paolo Pisati
ef544f6312 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@
2007-02-23 12:19:07 +00:00
Scott Long
f48f00a13a Fix spurious I/O errors when under high load.
Submitted by: Erich Chen
2007-02-15 15:36:15 +00:00
Scott Long
ad6d629763 Update to version 1.20.00.13 of the arcmsr driver. This fixes many bugs
as well as adds support for newer controllers.

Many thanks to Areca for their continued support.

Submitted by: Erich Chen
2006-12-13 08:46:03 +00:00
Matt Jacob
b3d93fd0c9 Add MODULE_DEPENDS for cam, pci, mca, eisa and isa where needed.
PR:		106543
MFC after:	3 days
2006-12-11 18:28:31 +00:00
Matt Jacob
bd3fd815a7 2nd and final commit that moves us to CAM_NEW_TRAN_CODE
as the default.

Reviewed by multitudes.
2006-11-02 00:54:38 +00:00
Matt Jacob
fa9ed86506 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
2006-10-31 05:53:29 +00:00
Ralf S. Engelschall
43109e5833 Fix typos: s/rebulid/rebuild/
Submitted by: Christoph Schug <chris@schug.net>
2006-08-31 08:45:44 +00:00
Poul-Henning Kamp
c40da00ca3 Since DELAY() was moved, most <machine/clock.h> #includes have been
unnecessary.
2006-05-16 14:37:58 +00:00
Ruslan Ermilov
f4e9888107 Fix -Wundef. 2005-12-04 02:12:43 +00:00
Warner Losh
721aafa81b Use same RID we allocated the resource with to free it 2005-06-05 23:05:26 +00:00
Yoshihiro Takahashi
d4fcf3cba5 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)
2005-05-29 04:42:30 +00:00
Scott Long
af06505ae3 Properly mask off the status bits when checking to see if the ccb is still
valid to process.  This was causing deferred commands to be rejected due
to their extra status flag.

MFC After: 3 days
2005-05-03 07:11:19 +00:00
Scott Long
701d9f1f1d The driver looks like it can create valid 64-bit scatter-gather lists, so
don't restrict it to a 32-bit address space.  Also use the correct busdma
flags for the SRB memory area.

MFC After: 3 days
2005-05-03 05:44:42 +00:00
Scott Long
4fd8c0dc7a The kthread is disabled at this time, so don't try to wake it up on
shutdown.  This fixes a panic on reboot.

MFC After: 3 days
2005-05-03 05:42:03 +00:00
Scott Long
1c7e93581d Don't bother pretending that CAM will send CAM_DATA_PHYS pointers. It's
a concept that is fundamentally broken with PAE.
2005-04-29 02:58:23 +00:00
Warner Losh
8d42a36cf1 arcmsr_make_timespec, and arcmsr_getcmos_time appear to be unused, and
reference functions that don't exist on at least pc98.  #if 0 them
out.  This should fix the pc98 tinderbox breakage.  Tested only on
i386 and pc98.
2005-04-01 07:15:52 +00:00
Scott Long
f1c579b1ec Add the Areca SATA RAID driver (arcmsr). This supports the ARC-11xx and 12xx
series of controllers.  Areca provides a CLI and HTTP management tool for
FreeBSD/i386 and FreeBSD/amd64 on their website.  Many thanks to Areca for
their support of FreeBSD.  Thanks also to Mike Tansca and Sentex Communications
for donating hardware.

Obtained from: Erich Chen <erich at areca com tw>
2005-03-31 18:19:55 +00:00