Commit Graph
537 Commits
Author SHA1 Message Date
Marius Strobl 3e04f07b0c MFC: 1.36
Add missing locking for SBus controllers.
2008-01-27 17:43:30 +00:00
Jung-uk Kim bf5eccc6bb MFC: 1.146
Export 4Gbps Fibre Channel link speed correctly with inquiry commands.
2007-08-27 16:56:28 +00:00
Matt Jacob 850f2e32fe mfc: bad merge fix 2007-05-11 13:48:33 +00:00
Matt Jacob 4b29160d65 Fix pointy-hat problem with BUS_DMA_ROOTARG macro that caused problems for sparc64. 2007-05-11 06:29:23 +00:00
Matt Jacob 967140dad5 MFC to synchronize with -current. The bugs fixed are relatively few and
hopefully the bugs introduved are even fewer.
2007-05-08 17:47:08 +00:00
Matt Jacob 8e61b6d734 MFC of constification, cleanups of pre-7.X compiles, additions of
SYNC_REG memory barriers and so on.
2007-04-01 17:21:19 +00:00
Matt Jacob bf83caa50e MFC of constification && some bad nvram flags. 2007-04-01 17:15:33 +00:00
Matt Jacob ab404703c9 MFC of some constification, error message spelling errors, splitting
FC and SPI default set/get into separate functions. Also, stop looking
for interrupts at the end of isp_starts- this seems to send some 23XX
cards into the weeds.
2007-04-01 17:14:25 +00:00
Matt Jacob 77b7102d4a feedback from RELENG_5 port 2007-03-11 01:59:44 +00:00
Matt Jacob 132db59155 MFC header/license cleanup. No effect on code. 2007-03-11 01:51:20 +00:00
Matt Jacob ce15fc6671 MFC 4 Gb support + rewrite of loop/fabric state machine code. 2007-03-08 05:31:40 +00:00
Luigi Rizzo 905f273b5b MFC: sync firmware(9) and iwi(4) with the version in HEAD (the changes
are related and this is why the MFC is done together).
In detail:

firmware(9):
  Cleanup and document the implementation of firmware(9) based on
  a version that i posted earlier on the -current mailing list,
  and subsequent feedback received. See the commit log
	luigi       2007-02-15 17:21:31 UTC
  The core of the change is just in sys/firmware.h and kern/subr_firmware.c,
  while other files are just adaptation of the clients to the ABI change
  (const-ification of some parameters and hiding of internal info,
  so this is fully compatible at the binary level).

  Note that in RELENG_6 sys/arm/xscale/ixp425, sys/dev/ipw and
  sys/dev/mxge do not exist or have not been updated to use firmware(9).

iwi(4)
  + add debugging code IWI_LOCK_CHECK() to print (under sysctl debug.iwi)
    missing locks;
  + make sure that iwi_ioctl() wait until the previous iwi_cmd() terminates.
2007-02-22 19:10:48 +00:00
Matt Jacob 286bffd350 MFC 1.41: Add a chip timeout to ENABLE/MODIFY/DISABLE lun calls. 2007-01-06 04:20:29 +00:00
cvs2svn e729e23abe This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2006-11-18 03:53:17 +00:00
Matt Jacob 17ddab1d99 MFC the current stable state of isp.
The high points for next RELENG_6 release are:

+ Fix 2322/6322 firmware loading- this card works a lot better with
loaded f/w.

+ Fix a considerable number of 2KLogin issues.

+ Clean all mailbox structures prior to use.

+ Remove some obsolete code within defines that haven't been
enabled in years.

+ Make Loop ID 125 a legal hard address (which it is).

+ Force HARD ADDRESS acquisition for all f/w revisions > 2.2.5

+ Use RIO_16BIT for 2200 cards >= 1.17.0 f/w, and enable
fast posting.

+ Honor ZIO nvram settings for 23XX cards.

+ Add an ISP_CRASHED state so that if we get a DMA error and the f/w
crashes we can unstall any mailbox commands that might have been
waiting.

+ Catch RISC PAUSED errors on interrupts.

+ Plus many, many more!
2006-09-01 05:55:14 +00:00
Matt Jacob 9d08b0e53c MFC 1.120: Fix RELENG_4 code version- isp_roles wasn't getting
initialized so it ended up defaulting to ISP_ROLE_NONE. My testing
hadn't caught it because I was deliberatly setting role via ioctl.
2006-08-21 00:48:37 +00:00
Matt Jacob e764ac0d67 MFC 1.117: don't claim to support the 2422 yet. 2006-07-14 05:19:17 +00:00
Matt Jacob fcfbb495c5 MFC: allow this to compile cleanly under RELENG_4 2006-06-03 07:21:09 +00:00
Matt Jacob c6a20f284e MFC 1.117: Don't set CAM_DEV_QFRZN when we get an ABORT_TASK. Just
by itself, this makes no sense.
2006-05-31 18:49:51 +00:00
Matt Jacob 0886c74d27 MFC current state of isp. Lots of cosmetic changes, but also various bugfixes. 2006-05-22 21:31:54 +00:00
Marius Strobl 817ee68141 MFC: 1.17
- Don't shift the clock frequency in MHz left by 8 before assigning it
  to sbus_mdvec.dv_clock as sbus_mdvec.dv_clock is meant to be specified
  in MHz. While this was a bug it shouldn't have affected FreeBSD/sparc64
  as sbus_mdvec.dv_clock is used to limit the clock rate of chips when
  a machine isn't able to support them at maximum speed which isn't the
  case for sun4u machines.
- Remove the code that checks whether the clock frequency returned by
  sbus_get_clockfreq() is 0 and falls back to 25MHz if it is as that's
  already done in sbus(4).

Approved by:	re (scottl)
2006-02-12 22:57:04 +00:00
Matt Jacob e77c61293e MFC overflow bug fixes and disable ISP_DAC_SUPPORTED for now
Approved by: re
2006-02-04 23:53:08 +00:00
Scott Long c6917ec5bc MFC: Move inlined functions into a library.
Approved by: re
2006-02-03 14:43:57 +00:00
cvs2svn 23d064f7bf This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2006-02-03 01:35:37 +00:00
Matt Jacob 4269a276d8 MFC current 2322 (and maybe 2422) support plus current target mode state. 2006-01-26 06:22:40 +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
Matt Jacob b49c46747a Fix some incorrectly swapped fields in an ICB.
Access a PCI register with correct width.

Obtained from:	Dmitry Valeryevich Trikoz
2005-05-11 03:00:50 +00:00
Matt Jacob 547725be50 Refactor isp_prt declaration so that platform
requirements can stay in platform files.
2005-05-11 00:22:17 +00:00
Stefan Farfeleder e68c6390f4 Prefer <sys/cdefs.h>'s __printflike() macro to the recently added
__GNUCLIKE_ATTRIBUTE_PRINTF.

Approved by:	mjacob
2005-03-07 15:29:11 +00:00
Warner Losh b77e575e1d Use BUS_PROBE_DEFAULT for pci probe return value 2005-03-05 18:17:35 +00:00
Joerg Wunsch a5f50ef9e4 netchild's mega-patch to isolate compiler dependencies into a central
place.

This moves the dependency on GCC's and other compiler's features into
the central sys/cdefs.h file, while the individual source files can
then refer to #ifdef __COMPILER_FEATURE_FOO where they by now used to
refer to #if __GNUC__ > 3.1415 && __BARC__ <= 42.

By now, GCC and ICC (the Intel compiler) have been actively tested on
IA32 platforms by netchild.  Extension to other compilers is supposed
to be possible, of course.

Submitted by:	netchild
Reviewed by:	various developers on arch@, some time ago
2005-03-02 21:33:29 +00:00
Scott Long da6297fcf9 Provide a needed argument to AT_MAKE_TAGID. 2005-01-23 22:33:59 +00:00
Matt Jacob 1b94141649 Add some macros for inserting tag ids.
MFC after:	2 weeks
2005-01-23 06:28:49 +00:00
Matt Jacob 182d1c037e Macroize the making of tag ids.
MFC after:	2 weeks
2005-01-23 06:28:08 +00:00
Matt Jacob 99334b0de4 Roll minor number.
MFC after:	2 weeks
2005-01-23 06:27:05 +00:00
Matt Jacob f2e4186204 Don't set ZIO for 23XX for target mode (use fast posting instead).
Use the correct number of handles for multihandle returns.

Very, very, rarely on some SMP systems we've seen an 'unstable' type
in the response queue. I dunno whether or not it's a bug in our
handling, or whether there's a cache incoherency issue, but
try to guard against it.

MFC after:	2 weeks
2005-01-23 06:26:45 +00:00
Matt Jacob dd1419abe1 Support the DELL OEM 2312 cards (1077,6312).
Many thanks to Stormweb for making the h/w available for testing.

MFC after:	2 days
2005-01-23 06:23:55 +00:00
Warner Losh 098ca2bda9 Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
Matt Jacob 6976709916 PAE support changes that included at least some minimal actual testing
with a kernel that booted.
2004-09-23 05:25:22 +00:00
Matt Jacob 6de9bf776e Do the small amount of tweaking to support PAE for at least initiator mode.
I was unable to test this as the PAE kernel crashed with a "cannot copy
LDT" before coming up. When this gets a bit more testing, I'll fix the PAE
conf file to allow isp devices.

PR:		59728
2004-09-07 08:04:09 +00:00
Matt Jacob e3e49f7e32 Until I can get a clearer architecture from PHK about why he wants
the geometry code to grab a mutex that prohibits any driver on the
stack below it from sleeping, it's not safe to allow anything in
the top half of isp to sleep (excepting the thread that Fibre Channel
instances use to re-scan loops/fabrics).
2004-08-23 19:04:19 +00:00
Marius Strobl 26280d88d7 - Introduce an ofw_bus kobj-interface for retrieving the OFW node and a
subset ("compatible", "device_type", "model" and "name") of the standard
  properties in drivers for devices on Open Firmware supported busses. The
  standard properties "reg", "interrupts" und "address" are not covered by
  this interface because they are only of interest in the respective bridge
  code. There's a remaining standard property "status" which is unclear how
  to support properly but which also isn't used in FreeBSD at present.
  This ofw_bus kobj-interface allows to replace the various (ebus_get_node(),
  ofw_pci_get_node(), etc.) and partially inconsistent (central_get_type()
  vs. sbus_get_device_type(), etc.) existing IVAR ones with a common one.
  This in turn allows to simplify and remove code-duplication in drivers for
  devices that can hang off of more than one OFW supported bus.
- Convert the sparc64 Central, EBus, FHC, PCI and SBus bus drivers and the
  drivers for their children to use the ofw_bus kobj-interface. The IVAR-
  interfaces of the Central, EBus and FHC are entirely replaced by this. The
  PCI bus driver used its own kobj-interface and now also uses the ofw_bus
  one. The IVARs special to the SBus, e.g. for retrieving the burst size,
  remain.
  Beware: this causes an ABI-breakage for modules of drivers which used the
  IVAR-interfaces, i.e. esp(4), hme(4), isp(4) and uart(4), which need to be
  recompiled.
  The style-inconsistencies introduced in some of the bus drivers will be
  fixed by tmm@ in a generic clean-up of the respective drivers later (he
  requested to add the changes in the "new" style).
- Convert the powerpc MacIO bus driver and the drivers for its children to
  use the ofw_bus kobj-interface. This invloves removing the IVARs related
  to the "reg" property which were unused and a leftover from the NetBSD
  origini of the code. There's no ABI-breakage caused by this because none
  of these driver are currently built as modules.
  There are other powerpc bus drivers which can be converted to the ofw_bus
  kobj-interface, e.g. the PCI bus driver, which should be done together
  with converting powerpc to use the OFW PCI code from sparc64.
- Make the SBus and FHC front-end of zs(4) and the sparc64 eeprom(4) take
  advantage of the ofw_bus kobj-interface and simplify them a bit.

Reviewed by:	grehan, tmm
Approved by:	re (scottl)
Discussed with:	tmm
Tested with:	Sun AX1105, AXe, Ultra 2, Ultra 60; PPC cross-build on i386
2004-08-12 17:41:33 +00:00
Poul-Henning Kamp 89c9c53da0 Do the dreaded s/dev_t/struct cdev */
Bump __FreeBSD_version accordingly.
2004-06-16 09:47:26 +00:00
Poul-Henning Kamp 186f2b9e04 Add missing <sys/module.h> includes currently relying on nested include
in <sys/kernel.h>
2004-06-03 06:10:02 +00:00
Nate Lawson 51e2355882 Store the target handles in a separate list from normal commands. Add a
CTIO fast post routine to handle CTIO completions.

Submitted by:	mjacob
2004-05-24 07:02:25 +00:00
Thomas Moestl eb01b42587 Correct the boundary parameter to the bus_dma_tag_create() calls (it was
(1 << 24) - 2 instead of 1 << 24, which it was obviously intended to
be). This fixes SBus isp(4)s on sparc64 machines.

Report and testing:  Marius Strobl <[email protected]>
2004-03-23 23:41:39 +00:00
Nate Lawson 5f96beb9e0 Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by:	Mark Santcroos <[email protected]>
Reviewed by:	imp, dfr, bde
2004-03-17 17:50:55 +00:00
Tom Rhodes a122cca953 These are changes to allow to use the Intel C/C++ compiler (lang/icc)
to build the kernel. It doesn't affect the operation if gcc.

Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as
icc v8 may define __GNUC__ some parts may look strange but are
necessary.

Additional changes:
 - in_cksum.[ch]:
   * use a generic C version instead of the assembly version in the !gcc
     case (ASM code breaks with the optimizations icc does)
     -> no bad checksums with an icc compiled kernel
     Help from:		andre, grehan, das
     Stolen from: 	alpha version via ppc version
     The entire checksum code should IMHO be replaced with the DragonFly
     version (because it isn't guaranteed future revisions of gcc will
     include similar optimizations) as in:
        ---snip---
          Revision  Changes    Path
          1.12      +1 -0      src/sys/conf/files.i386
          1.4       +142 -558  src/sys/i386/i386/in_cksum.c
          1.5       +33 -69    src/sys/i386/include/in_cksum.h
          1.5       +2 -0      src/sys/netinet/igmp.c
          1.6       +0 -1      src/sys/netinet/in.h
          1.6       +2 -0      src/sys/netinet/ip_icmp.c

          1.4       +3 -4      src/contrib/ipfilter/ip_compat.h
          1.3       +1 -2      src/sbin/natd/icmp.c
          1.4       +0 -1      src/sbin/natd/natd.c
          1.48      +1 -0      src/sys/conf/files
          1.2       +0 -1      src/sys/conf/files.amd64
          1.13      +0 -1      src/sys/conf/files.i386
          1.5       +0 -1      src/sys/conf/files.pc98
          1.7       +1 -1      src/sys/contrib/ipfilter/netinet/fil.c
          1.10      +2 -3      src/sys/contrib/ipfilter/netinet/ip_compat.h
          1.10      +1 -1      src/sys/contrib/ipfilter/netinet/ip_fil.c
          1.7       +1 -1      src/sys/dev/netif/txp/if_txp.c
          1.7       +1 -1      src/sys/net/ip_mroute/ip_mroute.c
          1.7       +1 -2      src/sys/net/ipfw/ip_fw2.c
          1.6       +1 -2      src/sys/netinet/igmp.c
          1.4       +158 -116  src/sys/netinet/in_cksum.c
          1.6       +1 -1      src/sys/netinet/ip_gre.c
          1.7       +1 -2      src/sys/netinet/ip_icmp.c
          1.10      +1 -1      src/sys/netinet/ip_input.c
          1.10      +1 -2      src/sys/netinet/ip_output.c
          1.13      +1 -2      src/sys/netinet/tcp_input.c
          1.9       +1 -2      src/sys/netinet/tcp_output.c
          1.10      +1 -1      src/sys/netinet/tcp_subr.c
          1.10      +1 -1      src/sys/netinet/tcp_syncache.c
          1.9       +1 -2      src/sys/netinet/udp_usrreq.c

          1.5       +1 -2      src/sys/netinet6/ipsec.c
          1.5       +1 -2      src/sys/netproto/ipsec/ipsec.c
          1.5       +1 -1      src/sys/netproto/ipsec/ipsec_input.c
          1.4       +1 -2      src/sys/netproto/ipsec/ipsec_output.c

          and finally remove
            sys/i386/i386        in_cksum.c
            sys/i386/include     in_cksum.h
        ---snip---
 - endian.h:
   * DTRT in C++ mode
 - quad.h:
   * we don't use gcc v1 anymore, remove support for it
   Suggested by:	bde (long ago)
 - assym.h:
   * avoid zero-length arrays (remove dependency on a gcc specific
     feature)
     This change changes the contents of the object file, but as it's
     only used to generate some values for a header, and the generator
     knows how to handle this, there's no impact in the gcc case.
   Explained by:	bde
   Submitted by:	Marius Strobl <[email protected]>
 - aicasm.c:
   * minor change to teach it about the way icc spells "-nostdinc"
   Not approved by:	gibbs (no reply to my mail)
 - bump __FreeBSD_version (lang/icc needs to know about the changes)

Incarnations of this patch survive gcc compiles since a loooong time,
I use it on my desktop. An icc compiled kernel works since Nov. 2003
(exceptions: snd_* if used as modules), it survives a build of the
entire ports collection with icc.

Parts of this commit contains suggestions or submissions from
Marius Strobl <[email protected]>.

Reviewed by:	-arch
Submitted by:	netchild
2004-03-12 21:45:33 +00:00
Poul-Henning Kamp dc08ffec87 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.
2004-02-21 21:10:55 +00:00
Poul-Henning Kamp c9c7976f7f Device megapatch 1/6:
Free approx 86 major numbers with a mostly automatically generated patch.

A number of strategic drivers have been left behind by caution, and a few
because they still (ab)use their major number.
2004-02-21 19:42:58 +00:00