Commit Graph

212 Commits

Author SHA1 Message Date
christos 168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
joerg fc0bc19fc7 Add rum(4) for newer USB Ralink devices. Obtained from OpenBSD.
Special thanks to Sepherosa Ziehau for helping debugging USB issues.
Hook up rum(4) for i386 config files.
2006-10-31 22:21:16 +00:00
christos 4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
rpaulo 41eefa78ba Add cleandir and clean fake targets. I should find a better way to do this. 2006-06-08 15:22:03 +00:00
rpaulo e84fae1d86 Add a fake includes target. 2006-06-08 00:21:54 +00:00
rpaulo 943d263332 Descend into ral. 2006-06-07 23:30:17 +00:00
rpaulo 95b0a57069 Definitions needed by subsequent Makefiles to install the firmware. 2006-06-07 19:54:04 +00:00
rpaulo a484b73c46 Refactor this and use bsd.files.mk instead. 2006-06-07 19:52:49 +00:00
rpaulo 6fe7f65c21 Define proginstall (empty) and afterinstall (to install the firmware). 2006-06-07 19:14:37 +00:00
rpaulo 9a7119856d License from Ralink. 2006-06-07 18:58:27 +00:00
rpaulo a49baeafe7 Generated firmware files for Ralink chipsets 2561, 2561s, 2661. 2006-06-04 20:32:53 +00:00
rpaulo e2c5d8e671 Framework to build Ralink wireless cards binary firmwares based on
Ralink distributed microcode.h.

From OpenBSD.
2006-06-04 20:30:17 +00:00
wiz 1ad8067cb3 Fix typos, reported by Alexey Dobriyan ("Gathered from Linux"),
forwarded by jmc@openbsd.
2006-02-25 00:58:34 +00:00
jonathan ba2e141969 TCP Segmentation Offload (TSO) add-on firmware for the
Broadcom bcm5703/bcm5704, and bcm5705, respectively.

Taken verbatim from the Linux-2.6.12.3 tg3 driver, where the firmware
is explictly marked as non-GPLed (hex-encoded binary blobs are not in
source form, and therefore violate the terms of the GPL), along with
the Boradcom non-GPL copyright allowing distribution of this
hex-encoded firmware.
2005-12-15 17:37:03 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
bouyer 44453e12b8 Regen: save offset at disconnect after a data phase without save data pointer. 2005-11-18 23:11:38 +00:00
bouyer 98fae666e4 Some drives disconnect after the last data phase without a save data pointer
message. In such case we would not update resid with the proper value
(eventually resid would not be updated at all if there was only one data
phase). To fix this, have the script save the offset in the data tables at
disconnect time if there was a transfer, and use this to compute the resid
if the current offset is 0.
Problem reported and patch tested by edwin, Roy Bixler and YAMAMOTO Takashi.
Fix kern/31990 by YAMAMOTO Takashi.
2005-11-18 23:10:32 +00:00
thorpej 6ab17a336e u_int8_t -> uint8_t 2005-06-27 03:36:25 +00:00
christos 3e8958bef3 remove bogus cast. 2005-05-31 00:49:12 +00:00
perry 5153a936fe revert the whitespace kill -- these are binaries. 2005-03-01 01:10:43 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
simonb 3cebd9325e White space nit- don't put a space before/after increment/decrement
operators.
2005-02-11 06:21:21 +00:00
joff f046ac8874 Atmel AT76C50XX firmware files (required by atu(4) USB-wifi adapter) 2005-01-24 01:00:19 +00:00
mycroft b4ae48a794 Add binary versions of firmware images, which will be used Soon. 2004-08-01 19:31:46 +00:00
bouyer 1c16a590ec Regen from esiop.ss 1.18 2004-05-17 18:38:22 +00:00
bouyer e842696ec7 Regen from siop.ss 1.18 2004-05-17 18:38:02 +00:00
bouyer 83478e12f3 when an unexpected disconnect occurs only compute the resid; do the
real save data pointers when we get the message (or rather, at disconnect
time following the message).
Factor out code to do this, and to deal with xs->resid, in siop_common.c.
2004-05-17 18:37:02 +00:00
bouyer a8b77ccfc4 Regen from esiop.ss 1.17. 2004-05-17 11:11:20 +00:00
bouyer 76fa396c1d Properly compute xs->resid, instead of assuming it'll always be 0 when
a command is done.
2004-05-17 11:10:24 +00:00
bouyer 7ec21dba35 Make it compile with recent compilers. 2004-05-16 22:45:51 +00:00
tls cd2ebe9f3f Revert ISP2100 firmware to Qlogic revision 1.19.16 (the version that shipped
with NetBSD 1.5).  With all newer versions available to us, we have seen
some adapters crash -- and fail to respond to reset -- under certain heavy
load conditions.  This version appears stable under heavy load with the
current driver on multiple systems on which we can reproduce the failure
with newer versions.
2004-05-02 19:07:04 +00:00
wiz 85746c6759 Spell interrupt with two rs. From Peter Postma. 2004-02-24 15:16:04 +00:00
briggs e718f8d0be Updated firmware from QLogic via Matt Jacob (from his Jan 14 distribution).
12160 Firmware Version 10.04.41 (10:30 Mar 21, 2003)
2200  Firmware Version  2.02.06 (08:39 Jun 26, 2003)
2300  Firmware Version  3.02.15 (08:26 Jul 21, 2003)
Matt's done some testing with it, and I've also tested on a very basic
setup with a QLA 2310 and a tower of 4 FC drives.
Unfortunately, there doesn't seem to be any change log for the firmware.
2004-01-21 16:59:45 +00:00
keihan b8702f530b netbsd.org -> NetBSD.org
This was the last commit of this kind to src/sys, which is now totally
"NetBSD.org clean".  Thanks for the patiance, and sorry for all the commits.
2003-12-04 13:57:30 +00:00
lukem f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
bouyer 7b066791c8 Remove references to University of California from my copyright notices. 2003-10-05 17:48:49 +00:00
thorpej ecffeb2eeb Apply the following change from 06/28/2003 04:44:10 by gibbs to the
FreeBSD ahd driver:

Use clr instead of an explicit mov from ALLZEROS
to clear SCB_FIFO_USE_COUNT.  This is just a
syntactic change.
2003-08-29 03:54:06 +00:00
thorpej e5d09ce27d Apply the following change from 06/28/2003 04:40:46 made by gibbs to the
FreeBSD ahd driver:

aic79xx.seq:
        Remove an old comment that no longer applies.

        Fix a jump in our unexpected non-packetized phase
        handler to use an explicit lable.  The old code
        had a hardcoded jump offset that was off by one
        instruction.
2003-08-29 03:51:50 +00:00
thorpej 93cbf1d88e Sync perforce IDs. (From FreeBSD) 2003-08-29 03:45:59 +00:00
thorpej 6336835ec0 Apply the following change from 05/30/2003 02:14:22 made by scottl to the
FreeBSD ahd driver:

Fix a reported case of severe data corruption:

aic79xx.h:
aic79xx.reg:
        Return the SCB_TAG field to 16byte alignment.
        It seems that on some PCI systems, SCBs are not
        transferred correctly to the controller with
        the previous placement of the SCB_TAG field.

Approved by:    re (rwatson)
2003-08-29 03:17:14 +00:00
thorpej 6095f5f091 Add some missing definitions for the LUNLEN register. 2003-08-29 01:52:16 +00:00
thorpej 3dd1bba4c4 Apply the following change made on 5/26/2003 21:26:51 by gibbs to the
FreeBSD ahd driver:

Correct/Simplify ignore wide residue message handling

aic79xx.c:
	In ahd_handle_ign_wide_residue():
	o Use SCB_XFERLEN_ODD SCB field to determine transfer
	  "oddness" rather than the DATA_COUNT_ODD logic.
	  SCB_XFERLEN_ODD is toggled on every ignore wide
	  residue message so that multiple ignore wide residue
	  messages for the same transaction are properly supported.
	o If the sg list has been exausted, the sequencer
	  doesn't bother to update the residual data count
	  since it is known to be zero.  Perform the zeroing
	  manually before calculating the remaining data count.
	o Use multibyte in/out macros instead of shifting/masking
	  by hand.

aic79xx_inline.h:
	In ahd_setup_scb_common(), setup the SCB_XFERLEN_ODD field.

aic79xx.reg:
	Use the SCB_TASK_ATTRIBUTE field as a bit field in the
	non-packetized case.  We currently only define one bit,
	SCB_XFERLEN_ODD.

	Remove the ODD_SEG bit field that was used to carry the odd
	transfer length information through the SG cache.  This
	is obviated by SCB_XFERLEN_ODD field.

	Remove the DATA_COUNT_ODD scratch ram byte that was used
	dynamicaly compute data transfer oddness.  This is obviated
	by SCB_XFERLEN_ODD field.

aic79xx.seq:
	Remove all updates to the DATA_COUNT_ODD scratch ram field.
	Remove all uses of ODD_SEG.  These two save quite a few
	sequencer instructions.

	Use SCB_XFERLEN_ODD to validate the end of transfer
	ignore wide residue message case.
2003-08-29 01:28:51 +00:00
thorpej 1109945598 Apply the following change made 5/26/2003 21:18:48 by gibbs to the
FreeBSD ahd driver:

Change hadling of the Rev. A packetized lun output bug
to be more efficient by having the sequencer copy the
single byte of valid lun data into the long lun field.

aic79xx.c:
	Memset our hardware SCB to 0 so that untouched
	fields don't confuse diagnostic output.  With the
	old method for handling the Rev A bug, if the long
	lun field was not 0, this could result in bogus
	lun information being sent to drives.

	Use the same SCB transfer size for all chip types
	now that the long lun is not DMA'ed to the chip.

aic79xx.seq:
	Add code to copy lun information for Rev.A hardware.

aic79xx_inline.h:
	Remove host update of the long_lun field on every
	packetized command.
2003-08-29 00:46:05 +00:00
thorpej e88c8722b7 Apply the following change checked in 2003/05/04 00:20:07 by gibbs
to the FreeBSD ahd driver:

Correct spelling errors.

Switch to handling bad SCSI status as a sequencer interrupt
instead of having the kernel proccess these failures via
the completion queue.  This is done because:

 o The old scheme required us to pause the sequencer and clear
   critical sections for each SCB.  It seems that these pause
   actions, if coincident with a sequencer FIFO interrupt, would
   result in a FIFO interrupt getting lost or directing to the
   wrong FIFO.  This caused hangs when the driver was stressed
   under high "queue full" loads.
 o The completion code assumed that it was always called with
   the sequencer running.  This may not be the case in timeout
   processing where completions occur manually via
   ahd_pause_and_flushwork().
 o With this scheme, the extra expense of clearing critical
   sections is avoided since the sequencer will only self pause
   once all pending selections have cleared and it is not in
   a critical section.

  aic79xx.c
        Add code to handle the new BAD_SCB_STATUS sequencer
        interrupt code.  This just redirects the SCB through
        the already existing ahd_complete_scb() code path.
        Remove code in ahd_handle_scsi_status() that paused
        the sequencer, made sure that no selections where
        pending, and cleared critical sections.  Bad
        status SCBs are now only processed when all of these
        conditions are true.

  aic79xx.reg:
        Add the BAD_SCB_STATUS sequencer interrupt code.

  aic79xx.seq:
        When completing an SCB upload to the host, if
        we are doing this because the SCB contains non-zero
        SCSI status, defer completing the SCB until there
        are no pending selection events.  When completing
        these SCBs, use the new BAD_SCB_STATUS sequencer
        interrupt.  For all other uploaded SCBs (currently
        only for underruns), the SCB is completed via the
        normal done queue.  Additionally, keep the SCB that
        is currently being uploaded on the COMPLETE_DMA_SCB
        list until the dma is completed, not just until the
        DMA is started.  This ensures that the DMA is restarted
        properly should the host disable the DMA transfer for
        some reason.

        In our RevA workaround for Maxtor drives, guard against
        the host pausing us while trying to pause I/O until the
        first data-valid REQ by clearing the current snapshot
        so that we can tell if the transfer has completed prior
        to us noticing the REQINIT status.

        In cfg4data_intr, shave off an instruction before getting
        the data path running by adding an entrypoint to the
        overrun handler to also increment the FIFO use count.

        In the overrun handler, be sure to clear our LONGJMP
        address in both exit paths.

Perform a few sequencer optimizations.

  aic79xx.c:
        Print the full path from the SCB when a packetized
        status overrun occurs.

        Remove references to LONGJMP_SCB which is being
        removed from firmware usage.

        Print the new SCB_FIFO_USE_COUNT field in the
        per-SCB section of ahd_dump_card_state().  The
        SCB_TAG field is now re-used by the sequencer,
        so it no longer makes sense to reference this
        field in the kernel driver.

  aic79xx.h:
        Re-arrange fields in the hardware SCB from largest
        size type to smallest.  This makes it easier to
        move fields without changing field alignment.

        The hardware scb tag field is now down near the
        "spare" portion of the SCB to facilitate reuse
        by the sequencer.

  aic79xx.reg:
        Remove LONGJMP_ADDR.

        Rearrange SCB fields to match aic79xx.h.
        Add SCB_FIFO_USE_COUNT as the first byte
        of the SCB_TAG field.

  aic79xx.seq:
        Add a per-SCB "Fifos in use count" field and use
        it to determine when it is safe (all data posted)
        to deliver status back to the host.  The old method
        involved polling one or both FIFOs to verify that
        the current task did not have pending data.  This
        makes running down the GSFIFO very cheap, so we
        will empty the GSFIFO in one idle loop pass in
        all cases.

        Use this simplification of the completion process
        to prune down the data FIFO teardown sequencer for
        packetized transfers.  Much more code is now shared
        between the data residual and transfer complete cases.

        Correct some issues in the packetized status handler.
        It used to be possible to CLRCHN our FIFO before status
        had fully transferred to the host.  We also failed to
        handle NONPACKREQ phases that could occur should a CRC
        error occur during transmission of the status data packet.

Correct a few big endian issues:

  aic79xx.c:
  aic79xx_inline.h:
  aic79xx_pci.c:
  aic79xx_osm.c:
        o Always get the SCB's tag via the SCB_GET_TAG acccessor
        o Add missing use of byte swapping macros when touching
          hscb fields.
        o Don't double swap SEEPROM data when it is printed.
          Correct a big-endian bug.  We cannot assign a
        o When assigning a 32bit LE variable to a 64bit LE
          variable, we must be explict about how the words
          of the 64bit LE variable are initialized.  Cast to
          (uint32_t*) to do this.

aic79xx.c:
        In ahd_clear_critical_section(), hit CRLSCSIINT
        after restoring the interrupt masks to avoid what
        appears to be a glitch on SCSIINT.  Any real SCSIINT
        status will be persistent and will immidiately
        reset SCSIINT.  This clear should only get rid of
        spurious SCSIINTs.

        This glitch was the cause of the "Unexpected PKT busfree"
        status that occurred under high queue full loads

        Call ahd_fini_scbdata() after shutdown so that
        any ahd_chip_init() routine that might access
        SCB data will not access free'd memory.

        Reset the bus on an IOERR since the chip doesn't
        seem to reset to the new voltage level without
        this.
        Change offset calculation for scatter gather maps
        so that the calculation is correct if an integral
        multiple of sg lists does not fit in the allocation
        size.

        Adjust bus dma tag for data buffers based on 39BIT
        addressing flag in our softc.

        Use the QFREEZE count to simplify ahd_pause_and_flushworkd().
        We can thus rely on the sequencer eventually clearing ENSELO.

        In ahd_abort_scbs(), fix a bug that could potentially
        corrupt sequencer state.  The saved SCB was being
        restored in the SCSI mode instead of the saved mode.
        It turns out that the SCB did not need to be saved at all
        as the scbptr is already restored by all subroutines
        called during this function that modify that register.

aic79xx.c:
aic79xx.h:
aic79xx_pci.c:
        Add support for parsing the seeprom vital product
        data.  The VPD data are currently unused.

aic79xx.h:
aic79xx.seq:
aic79xx_pci.c:
        Add a firmware workaround to make the LED blink
        brighter during packetized operations on the H2A.

aic79xx_inline.h:
        The host does not use timer interrupts, so don't
        gate our decision on whether or not to unpause
        the sequencer on whether or not a timer interrupt
        is pending.
2003-08-29 00:09:59 +00:00
bouyer bc45dbf125 Regen from esiop.ss 1.15. 2003-08-06 11:40:32 +00:00
bouyer 96fb3c0376 Properly handle messages that we get at reconnect time (other than
SIMPLE_Q_TAG). Some drives start sync/wide negotiation at reconnect time.
Problem reported and fix tested by Andreas Wrede.
2003-08-06 11:39:58 +00:00
lukem 9391907df1 add missing __RCSID() 2003-07-14 15:40:37 +00:00
drochner f2d5c0b3e3 VERY quick and VERY dirty port of the OpenBSD "txp" driver for
3Com 3C(R)990 cards. No TCP/UDP nor IPSEC offloading for now.
The ifmedia part needs some work, but I only have a 100-FX card;
hopefully someone will clean this up.
2003-07-01 20:08:51 +00:00
wiz 74da88f77a Correct spelling of coalesce. (Will forward to Justin Gibbs.) 2003-05-14 12:57:45 +00:00
wiz 1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00