Commit Graph

2797 Commits

Author SHA1 Message Date
Greg Lehey b853969e09 Import RAID-5 code.
Add Cybernet copyright.

OK'd-by:     Chuck Jacobus <chuck@cybernet.com>
1999-08-07 08:11:22 +00:00
Greg Lehey f9c8e4cda3 Import RAID-5 code.
Add Cybernet copyright.

OK'd-by:     Chuck Jacobus <chuck@cybernet.com>

detchobject:  Don't update the object configuration.

replaceobject: Add preliminary code.  This is not yet complete.

vinumw.h vinumparser.c:

Add keyword 'hotspare'.
1999-08-07 08:09:36 +00:00
Greg Lehey dbac8959f7 Add definition of new ioctl (READPOL) for setting the read policy of a
plex.  The code is not yet complete.
1999-08-07 08:08:18 +00:00
Greg Lehey 78436bf362 Remove code to accept partitions of type 'unused'. From now on, Vinum
will only accept partitions of type 'vinum'.

format_config: Use the new %q format option in kvprintf, thus getting
  rid of some of the filthiest code I've written in a long time.  Also
  remove the lltoa() function.

With-great-thanks-to:	peter

format_config: Accept the fact that a subdisk might not be attached to
  a plex, and save the config correctly.

vinum_scandisk: Scan all slices on a drive with a Microsoft partition
  table.  Only look at the compatibility slice if nothing was found in
  the Microsoft slices.

  This change removes a frequently employed method of shooting
  yourself in the foot: people would decide that the Vinum drives
  belonged on their own slice, and they wouldn't be able to start the
  subsystem after a reboot.  Documentation updates to follow.
1999-08-07 08:07:05 +00:00
Greg Lehey ffb0a6283d Close a memory leak. 1999-08-07 08:06:05 +00:00
Greg Lehey b583bb9698 vinumopen: add code to open raw subdisks. This is now used to
initialize subdisks.  Probably the plex-related subdisk type will die
a death.

vinumconfig.c:

Accept (and ignore) kernel state information in userland config
files.  This saves a lot of error recovery and also makes it possible
to use the output of printconfig to create new configuration.

Remove checkdiskconfig().  It wasn't needed any more.

Start adding support for hot spare drives.  You can't put anything on
them (yet).

Change message formats from %lld to %qd.

get_empty_sd: Initialize size to -1.  Previously this was done in
config_subdisk, which is the wrong place.

start_config: set current drive, plex and volume to -1, thus stopping
  update configurations from taking their defaults from old configs.
1999-08-07 08:05:46 +00:00
Greg Lehey 9640a3a8f8 Rework many comments.
requeststatus:
  add REQUEST_DEGRADED status

struct rqinfo:
  add members devmajor and devminor to compensate for lost dev_t.
1999-08-07 08:05:19 +00:00
Søren Schmidt 2203dc0030 Add limitted support for the Promise Ultra/66 controller. Its
only supported upto UDMA33 like the old Promise, but it works
now. More when I have specs ....
1999-08-06 17:39:38 +00:00
Brian Feldman e32c66c539 Fix fd race conditions (during shared fd table usage.) Badfileops is
now used in f_ops in place of NULL, and modifications to the files
are more carefully ordered. f_ops should also be set to &badfileops
upon "close" of a file.

This does not fix other problems mentioned in this PR than the first
one.

PR:		11629
Reviewed by:	peter
1999-08-04 18:53:50 +00:00
Matthew N. Dodd dfc196bf2a I'm not sure how this wasn't in the last commit but anyhow...
'int irq' -> 'struct irq_node *irq'
1999-08-02 20:01:40 +00:00
Matthew N. Dodd 0d6ab4a16a Move the specification of EDGE/LEVEL triggered interrupts to
eisa_add_intr() which now takes an additional arguement (one of
EISA_TRIGGER_LEVEL or EISA_TRIGGER_EDGE).

The flag RR_SHAREABLE has no effect when passed to
bus_alloc_resource(dev, SYS_RES_IRQ, ...) in an EISA device context as
the eisa_alloc_resource() call (bus_alloc_resource method) now deals
with this flag directly, depending on the device ivars.

This change does nothing more than move all the 'shared = inb(foo + iobsse)'
nonesense to the device probe methods rather than the device attach.

Also, print out 'edge' or 'level' in the IRQ announcement message.

Reviewed by: dfr
1999-08-01 22:57:09 +00:00
Mark Newton 8e70e7d663 Cleanup - diked out a heap of old KLM stuff that isn't needed anymore. 1999-08-01 12:51:06 +00:00
Matthew N. Dodd 96a0f2956f Don't use at_shutdown() now that we have new_bus which lets us
specify a DEVICE_SHUTDOWN method instead.

Reviewed by: me, since nobody else seems to run this hardware in -CURRENT
1999-07-31 00:43:48 +00:00
Matthew N. Dodd 24116fdd0a Restore the pre-new_bus behavior of printing out the reserved resources
during device announcement. (irq, ioport, maddr)

Reviewed by: dfr, peter
1999-07-30 13:54:00 +00:00
Mark Newton 04f84b3402 Eliminate 'WARNING: "streams" is usurping "streams"'s cdevsw[]' messages
at boot
1999-07-30 12:39:49 +00:00
Joerg Wunsch 25d01e9527 Revert rev 1.149. Bruce convinced me that the problem already disappeared
by the fix in rev 1.120, which i wasn't immediately aware of.
1999-07-29 11:27:33 +00:00
Matthew N. Dodd 15317dd875 Alter the behavior of sys/kern/subr_bus.c:device_print_child()
- device_print_child() either lets the BUS_PRINT_CHILD
	  method produce the entire device announcement message or
	  it prints "foo0: not found\n"

Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on
the previous behavior of device_print_child() (printing the
"foo0: <FooDevice 1.1>" bit of the announce message.)

Provide bus_print_child_header() and bus_print_child_footer()
to actually print the output for bus_generic_print_child().
These functions should be used whenever possible (unless you can
just use bus_generic_print_child())

The BUS_PRINT_CHILD method now returns int instead of void.

Modify everything else that defines or uses a BUS_PRINT_CHILD
method to comply with the above changes.

	- Devices are 'on' a bus, not 'at' it.
	- If a custom BUS_PRINT_CHILD method does the same thing
	  as bus_generic_print_child(), use bus_generic_print_child()
	- Use device_get_nameunit() instead of both
	  device_get_name() and device_get_unit()
	- All BUS_PRINT_CHILD methods return the number of
	  characters output.

Reviewed by: dfr, peter
1999-07-29 01:03:04 +00:00
Doug Rabson aa595accc9 Add support for SYS_RES_DENSE and SYS_RES_BWX resource types. These are
equivalent to SYS_RES_MEMORY for x86 but for alpha, the rman_get_virtual()
address of the resource is initialised to point into either dense-mapped
or bwx-mapped space respectively, allowing direct memory pointers to be
used to device memory.

Reviewed by: Andrew Gallatin <gallatin@cs.duke.edu>
1999-07-28 07:57:48 +00:00
Nick Hibma 2cc20f83b3 Every reqh in an aborted pipe is given status CANCELED and the callback is
called. It might be necessary to split that routine into two parts in
which calling the callback is not done at splusb().
1999-07-27 20:22:29 +00:00
Bill Paul 070f62142c Roar! Finish what I started last night: somehow only the header file change
got committed.
1999-07-27 13:54:15 +00:00
Matthew N. Dodd 0158b2dcc3 Case matters.
DEv_METHOD to DEV_METHOD.
1999-07-27 05:08:36 +00:00
Matthew N. Dodd 5a8cee9a60 Implement the BUS_PROBE_NOMATCH method for the PCI bus.
This function is called for each device for which no driver
was found.

Output is similar to the eisa_probe_nomatch() function but with the
added benefit of displaying the assigned IRQ (since PCI gives us
this information up front.)

Output is like so:

pci0: unknown card CPQ0508 (vendor=0x0e11, dev=0x0508) at 11.0 irq 9
pci0: unknown card DFZ0508 (vendor=0x10da, dev=0x0508) at 11.0 irq 9
pci0: unknown card DBL0508 (vendor=0x104c, dev=0x0508) at 11.0 irq 9
pci0: unknown card DDM0011 (vendor=0x108d, dev=0x0011) at 11.0 irq 9

I'm not happy with the 3 lines of macro cruft that got added but
I consider it a temporary annoyance as those bits will be moved to
some place where PCI, EISA and ISAPNP code will be able to use them.

(Not surprisingly, this message is longer than the code in question.)

Reviewed by: peter, dfr
1999-07-27 04:28:14 +00:00
Bill Paul af1c062105 On FreeBSD/i386, when you use the SYS_RES_MEMORY resource to allocate
a PCI memory mapped region, rman_get_bushandle() returns what happens
to be a kernel virtual address pointing to the base of the PCI shared
memory window. However this is not the behavior on all platforms:
the only thing you should do with the bushandle is pass it to the
bus_spare_read()/bus_space_write() routines. If you actually do want
the kernel virtual address of the base of the PCI memory window, you
need to use rman_get_virtual().

The problem is that at the moment, rman_get_virtual() returns a physical
address, which is bad. In order to get the kernel virtual address we
need, we have to play with it a little.

Presumeably this behavior will be changed, but in the meantime the
Tigon driver won't work. So for the moment, I'm adding a kludge to
make things happy on the alpha: the correct kernel virtual address
is calculated from the value returned by rman_get_virtual(). This
should be removed once rman_get_virtual() starts doing the right
thing.

This should make the Tigon actuall work on the alpha now.
1999-07-27 03:54:48 +00:00
Nick Hibma 6d38342e16 Add comments, change variable names to make them consistent (r -> err,
timo_handle -> timeout_handle, p -> pipe, *pipe -> *rpipe, etc.)
1999-07-25 18:54:22 +00:00
Peter Wemm eda5a3370a Make this compile on the Alpha. I'm not 100% sure about this but I
think it's ok.  ti_bhandle is fetched from newbus on both the Alpha
and x86, the Alpha-only ti_vhandle is gone.
1999-07-25 06:46:19 +00:00
Bill Paul c9ce464cb7 Remember to clear the IFF_RUNNING and IFF_OACTIVE flags in sf_stop() and
sk_stop().
1999-07-25 05:16:05 +00:00
Bill Paul 691c152864 This commit adds device driver support for Adaptec Duralink PCI fast
ethernet controllers based on the AIC-6915 "Starfire" controller chip.
There are single port, dual port and quad port cards, plus one 100baseFX
card. All are 64-bit PCI devices, except one single port model.

The Starfire would be a very nice chip were it not for the fact that
receive buffers have to be longword aligned. This requires buffer
copying in order to achieve proper payload alignment on the alpha.
Payload alignment is enforced on both the alpha and x86 platforms.
The Starfire has several different DMA descriptor formats and transfer
mechanisms. This driver uses frame descriptors for transmission which
can address up to 14 packet fragments, and a single fragment descriptor
for receive. It also uses the producer/consumer model and completion
queues for both transmit and receive. The transmit ring has 128
descriptors and the receive ring has 256.

This driver supports both FreeBSD/i386 and FreeBSD/alpha, and uses newbus
so that it can be compiled as a loadable kernel module. Support for BPF
and hardware multicast filtering is included.
1999-07-25 04:32:50 +00:00
Tatsumi Hosokawa 6afaf5d480 3C574TX 16bit FastEtherlink PC-card support.
Reviewed by:	HAMADA Naoki <nao@tom-yam.or.jp>
Submitted by:	Osamu MIHARA <mihara@prd.fc.nec.co.jp>
1999-07-25 01:20:37 +00:00
Bill Paul 571a80b261 Clean up the buffer allocation code a bit. Make sure to initialize certain
critical mbuf fields to sane values. Simplify the use of ETHER_ALIGN to
enforce payload alignment, and turn it on on the x86 as well as alpha
since it helps with NFS which wants the payload to be longword aligned
even though the hardware doesn't require it.

This fixes a problem with the ti driver causing an unaligned access trap
on the Alpha due to m_adj() sometimes not setting the alignment correctly
because of incomplete mbuf initialization.
1999-07-23 18:46:24 +00:00
Bill Paul 43a095a5fd Grrr. Return the rman_get_bustag()/rman_get_bushandle() lines to their
proper place in ti_attach(). I'm positive I typed them in there, but
they must have fallen victim to a drive-by cut & pasting.
1999-07-23 16:21:43 +00:00
Bill Paul 09590dc4c1 One last tweak before I turn in for the evening: the driver name in
the driver_t declaration should be "skc" not "sk". Technically, "skc"
is the parent PCI device (the SysKonnect GEnesis controller) and "sk0"
and "sk1" are the network interfaces that get attached to it.
1999-07-23 05:50:35 +00:00
Bill Paul 39d837d4b5 Dangit. Somehow the pmap_kextract hack for alpha snuck back into these
files. Change them back to alpha_XXX_dmamap().

Pointed out by: Andrew Gallatin
1999-07-23 02:18:01 +00:00
Bill Paul 89ca84e6db Convert the Alteon Tigon gigabit ethernet driver to newbus. Also upgrade
to the latest firmware release from Alteon (12.3.12).
1999-07-23 02:10:11 +00:00
Bill Paul 5c9e5de3e3 Some more small newbus cleanups. Remember to free all resources in case
of failures in foo_attach(), simplify iospace/memspace things a little.
1999-07-23 02:06:57 +00:00
Bill Paul 75156903c8 Fix a small mind-o: one instance of SYS_RES_IOPORT should have been
SYS_RES_MEMOTY in sk_detatch().
1999-07-22 14:58:54 +00:00
Greg Lehey aa30608b44 Modify device numbering method to work with latest -CURRENT. Briefly,
the device numbers are now minor number only, so that we can still
compare them after dev_t has turned into a blob.

Broken-by:	dev_t changes
Reported-by:	Vallo Kallaste <vallo@matti.ee>
		"Niels Chr. Bank-Pedersen" <ncbp@bank-pedersen.dk>
1999-07-22 08:40:37 +00:00
Bill Paul e11a2e3d81 Convert the SysKonnect gigabit ethernet driver to newbus. 1999-07-22 04:04:12 +00:00
Joerg Wunsch 409aadb1c9 Hack to work around a NULL pointer dereferencation that can be triggered
by removing a floppy that as being operated on.

The spagghetti is hardly understandable at all anymore, so i can't
100 % ascertain this is really the Right Thing to do, maybe our new
floppy driver maintainer, Jesus Monroy Jr can do this. :-))
1999-07-21 12:19:44 +00:00
Bill Paul 7694cd9368 Correct the alignment of some of the members in the wi_frame structure.
The structure is the right length, but some of the members (notably
wi_q_info) were off a bit. This causes the received signal strength
values to appear bogus.
1999-07-20 20:03:42 +00:00
Poul-Henning Kamp 698bfad7f2 Now a dev_t is a pointer to struct specinfo which is shared by all specdev
vnodes referencing this device.

Details:
        cdevsw->d_parms has been removed, the specinfo is available
        now (== dev_t) and the driver should modify it directly
        when applicable, and the only driver doing so, does so:
        vn.c.  I am not sure the logic in checking for "<" was right
        before, and it looks even less so now.

        An intial pool of 50 struct specinfo are depleted during
        early boot, after that malloc had better work.  It is
        likely that fewer than 50 would do.

        Hashing is done from udev_t to dev_t with a prime number
        remainder hash, experiments show no better hash available
        for decent cost (MD5 is only marginally better)  The prime
        number used should not be close to a power of two, we use
        83 for now.

        Add new checkalias2() to get around the loss of info from
        dev2udev() in bdevvp();

        The aliased vnodes are hung on a list straight of the dev_t,
        and speclisth[SPECSZ] is unused.  The sharing of struct
        specinfo means that the v_specnext moves into the vnode
        which grows by 4 bytes.

        Don't use a VBLK dev_t which doesn't make sense in MFS, now
        we hang a dummy cdevsw on B/Cmaj 253 so that things look sane.

	Storage overhead from all of this is O(50k).

        Bump __FreeBSD_version to 400009

The next step will add the stuff needed so device-drivers can start to
hang things from struct specinfo
1999-07-20 09:47:55 +00:00
Poul-Henning Kamp 82f1cd60df use vp->v_rdev;
OK'ed by:	grog
1999-07-20 07:29:54 +00:00
Poul-Henning Kamp 684adedee4 Use the vn_todev() function, rather than VOP_GETATTR 1999-07-18 14:31:01 +00:00
Kazutaka YOKOTA f1235db8bd - Clear relevant variables when the keyboard is not available.
- Do not touch the `tty' struct when it's not yet available.
- Initialize correct bits in `fonts_loaded'.
1999-07-18 06:16:53 +00:00
Kazutaka YOKOTA 29e59d7deb - Move the `return' statement the correct place so that the keyboard
won't be initialized if `atkbd?' is disabled.
1999-07-18 06:16:25 +00:00
Poul-Henning Kamp 59c4226d5f Fix 2nd arg to udev2dev() call in ccd.c 1999-07-17 19:58:37 +00:00
Poul-Henning Kamp 835646d6ef slight change in the way we hi-jack the wd drivers cdevsw. 1999-07-17 17:55:53 +00:00
Bill Paul ab03d8e65f Make a few other cleanups while I'm in the area. Typo in comment, unused
structure members, etc. No functional changes.
1999-07-14 21:53:11 +00:00
Bill Paul b31b2566e0 Revert some changes I had made to try and cut down on the number of TX EOF
interrupts that were scheduled. Testing shows it didn't really do very much
and it makes the code a little more complicated (which is never a good thing).

Also fix the rambuffer offset initialization for the 512K/64K SRAM case
(512K total using 64K chips). It should be 0. The only case with a
non-standard rambuffer offset address is 1024K/64K according to the
SysKonnect manual. (My card has the 1024/64 configuration and I don't know
which card uses the 512/64 configuration, if any, so I'm not sure that
this was really a problem for anyone.)
1999-07-14 18:57:32 +00:00
Roger Hardiman 4efbc31757 Bug fixes
Change number of VBI lines from 16 to 12 for NTSC formats.
 Juha.Nurmela@quicknet.inet.fi found/fixed bug in VBI_SLEEP.

New features
 MSP3430G DBX initialisation from Matt Brown <matt@dqc.org>
 STB Bt878 card identification.
 Hauppauge Model Number identification.
 Changes to probeCard() for better eeprom identification.
 Experimental TDA9850 initialisation code, from Linux bttv.

Cross Platform Changes
 The driver has been reorgainsed based ideas from Brad Parker's port to Linux
 to seperate OS Dependant and Independant sections.
 I have backends for FreeBSD 2.2.x/3.x and 4.x newbus, BSDI, OpenBSD and NetBSD.

This commit has FreeBSD 2.2.8/2.2-stable/3.x and FreeBSD 4.x newbus backends.

Some code submitted by: Juha.Nurmela@quicknet.inet.fi
                        Matt Brown <matt@dqc.org>
                        Brad Parker <brad@parker.boston.ma.us>

Some code obtained from:        Linux bttv driver
1999-07-12 15:51:50 +00:00
Kazutaka YOKOTA 01533d852e Improve Logitech MouseMan+ protocol support. 1999-07-12 15:16:14 +00:00
Kazutaka YOKOTA 551e01b126 Implement a kludge for some wheeled mice for which infamous "psmintr:
out of sync..." messages is generated and the wheel movement is not
recognized.

The trick is found by Takashi Nishida.
1999-07-12 13:40:21 +00:00
Doug Rabson ca7036d8cb Add a hook for a bus to detect child devices which didn't find drivers.
This allows the bus to print an informative message about unknown devices.

Submitted by: Matthew N. Dodd <winter@jurai.net>
1999-07-11 13:42:37 +00:00
Peter Wemm 4ae8675cf7 Convert the if_fea (DEC FDDI) driver to newbus since it has been broken
for ages.  This is the EISA wrapper for sys/dev/pdq/*.  The pci bus driver
is in sys/pci/if_fpa.c.

Submitted by:	"Matthew N. Dodd" <winter@jurai.net>
1999-07-10 19:46:08 +00:00
Bill Paul 05919c5b73 if_sk.c: use pci_port_t instead of u_short
if_skreg.h: use alpha_XXX_dmamap() instead of pmap_kextract hackery on
alpha platform
1999-07-09 17:36:23 +00:00
Bill Paul 3ebb090530 This commit adds driver support for the SysKonnect SK-984x series
gigabit ethernet adapters. This includes two single port cards
(single mode and multimode fiber) and two dual port cards (also single
mode and multimode fiber). SysKonnect is currently the only
vendor with a dual port gigabit ethernet NIC.

The ports on dual port adapters are treated as separate network
interfaces. Thus, if you have an SK-9844 dual port SX card, you
should have both sk0 and sk1 interfaces attached. Dual port cards
are implemented using two XMAC II chips connected to a single
SysKonnect GEnesis controller. Hence, dual port cards are really
one PCI device, as opposed to two separate PCI devices connected
through a PCI to PCI bridge. Note that SysKonnect's drivers use
the two ports for failover purposes rather that as two separate
interfaces, plus they don't support jumbo frames. This applies to
their Linux driver too. :)

Support is provided for hardware multicast filtering, BPF and
jumbo frames. The SysKonnect cards support TCP checksum offload
however this feature is not currently enabled (hopefully it will
be once we get checksum offload support).

There are still a few things that need to be implemeted, like
the ability to communicate with the on-board LM80 voltage/temperature
monitor, but I wanted to get the driver under CVS control and into
-current so people could bang on it.

A big thanks for SysKonnect for making all their programming info
for these cards (and for their FDDI and token ring cards) available
without NDA (see www.syskonnect.com).
1999-07-09 04:30:09 +00:00
Kazutaka YOKOTA c4c9400b69 - Fixed memory leak in sc_alloc_history_buffer().
- Correctly observe the variable `extra_history_size' when changing
  the size of history (scroll back) buffer.
- Added sc_free_history_buffer().

Pointed out by: des
1999-07-07 13:48:50 +00:00
Dag-Erling Smørgrav 6b5ca0d83e Rename bpfilter to bpf. 1999-07-06 19:23:32 +00:00
Peter Wemm 0d50adcacf Don't clobber the smb cdevsw entry that was installed by the driver
framework.
1999-07-06 13:42:43 +00:00
Matt Jacob ecc94a93d5 add in (controlled by option) 2200 Expanded Lun F/W 1999-07-06 05:38:24 +00:00
Matt Jacob 9ba8673786 add in a boot environment isp_disable flag 1999-07-06 01:24:20 +00:00
Matt Jacob 100f099ba4 Wow- too much breakage..wait until you compile it, buckwheat... 1999-07-05 22:04:08 +00:00
Matt Jacob 86cb5d6b95 Oops- got sense of ifdef wrong 1999-07-05 22:01:48 +00:00
Matt Jacob 3692397b0d add 2200 f/w; fix botched define 1999-07-05 20:42:08 +00:00
Matt Jacob 5542fe4b1a add ISP_DISABLE_2200_SUPPORT defines; Add reference to 2200 F/W 1999-07-05 20:24:46 +00:00
Bill Paul 7f971fc2ca Remove ti_refill_rx_rings() and associated stuff; replace dirty RX buffers
in ti_rxeof() instead. This doesn't really seem to provide much in the
way of a performance boost, and I'm pretty sure it can cause mbuf leakage
in some extreme cases.
1999-07-05 20:19:41 +00:00
Poul-Henning Kamp 03016f421b Remove cmaj and bmaj args from DEV_DRIVER_MODULE. 1999-07-04 14:58:56 +00:00
Bill Paul f30fba37d7 Patch the WaveLAN/IEEE driver to detect and reject oversized received
frames (or just insane received packet lengths generated due to errors
reading from the NIC's internal buffers). Anything too large to fit
safely into an mbuf cluster buffer is discarded and an error logged.

I have not observed this problem with my own cards, but on user has
reported it and adding the sanity test seems reasonable in any case.

Problem noted and patch provided by: Per Andersson <per@cdg.chalmers.se>
1999-07-04 14:40:22 +00:00
Nick Hibma 2677b5a4db Add the semi-official Bulk protocol id 'P' 1999-07-03 22:19:41 +00:00
Peter Wemm 9929d2a045 Eliminate a bunch of #include "pci.h" and #if NPCI > 0 around entire
files.  config will leave the whole file out if configured to do so.
1999-07-03 20:17:08 +00:00
Matt Jacob a02592816a Well, don't try and probe 65535 luns- things just don't really work well
when this happens. Limit to 16 luns for the 2100/2200 for now.
1999-07-03 01:44:05 +00:00
Matt Jacob 222bb54266 Remove pre-CAM code. Add in getenv_int calls for variables isp_mem_map,
isp_io_map, isp_no_fwload, isp_fwload, isp_no_nvram, isp_fcduplex
which are all bitmaps of isp instances that should or shouldn't
map memory space, I/O space, not load f/w, load f/w, ignore nvram,
not ignore nvarm, set full duplex mode. Also have an isp_seed value
that we can use to generate a pseudo seed for a synthetic WWN.
Other minor cosmetic cleanup. Add in support for the Qlogic ISP
2200. Very important change where we actually check now to see
whether we were successful in mapping request and response queues
(and fibre channel scratch space).
1999-07-02 23:18:03 +00:00
Matt Jacob 02ab33795d Remove all pre-CAM code. Fix breakage for SCCLUN when it is in fact
ISP2100_SCCLUN. Make changes for how ISPASYNC_PDB_CHANGE_COMPLETE
is now ISPASYNC_PDB_CHANGED. Add in ISPASYNC_FABRIC_DEV case.
1999-07-02 23:12:58 +00:00
Matt Jacob b460c5c9a9 Merge defunct isp_freebsd_cam.h into this file. Do some appropriate
changes like rolling minor revision levels and defines where we now
do default WWN seeding in the platform files.
1999-07-02 23:10:34 +00:00
Matt Jacob 83cdc1a2b0 Roll revision levels. Add support for the Qlogic 2200 (warn about
not having SCSI_ISP_SCCLUN config defined if we don't have f/w for
the 2200- it's resident firmware uses SCCLUN (65535 luns)). Change
the way the default LoopID is gathered (it's now a platform specific
define so that some attempt at a synthetic WWN can be made in case
NVRAM isn't readable).

Change initialization of options a bit- don't use ADISC. Set
FullDuplex mode if config options tells us to do so. Do not use
FULL_LOGIN after LIP- it's the right thing to do but it causes too
much loop disruption (Loop Resets). Sanity check some default
values. Redo construction of port and node WWNs based upon what we
have- if we have 2 in the top nibble, we can have distinct port
and node WWNs. Clean up some SCCLUN related code that we obviously
had never compiled (:-(). Audit commands coming int ispscsicmd and
don't throw commands at Fibre devices that do not have Class 3
service parameters TARGET ROLE defined.

Clean up f/w initialization a bit. Add Fabric support (or at least
the first blush of it). Whew - way too much to describe here.
Basically, after a LIP, hang out until we see a Loop Up or a Port
DataBase Change async event, then see if we're on a Fabric
(GET_PORT_NAME of FL_PORT_ID). If we are, try and scan the fabric
controller for fabric devices using the GetAllNext SNS subcommand.
As we find devices, announce them to the outer layer. Try and do
some guard code for broken (Brocade) SNS servers (that get stuck
in loops- gotta maybe do this a different way using the GP_ID3 cmd
instead).  Then do a scan of the lower (local loop) ids using a
GET_PORT_NAME to see if the f/w has logged into anything at that
loop id. If so, then do a GET_PORT_DATABASE command.  Do this scan
into a local database. At this point we can say the loop is 'Ready'.
After this, we merge our local loop port database with our stored
port database- in a as yet to be really fully exercised fashion we
try and follow the logic of something having moved around. The
first time we see something at a Loop ID, we fix it, for the purpose
of this system instance, at that Loop ID. If things shift around
so it ends up somewhere else, we still keep it at this Loop ID (our
'Target') but use the new (moved) Loop ID when we actually throw
commands at it. Check for insane cases of different Loop IDs both
claiming to have the same WWN- if that happens, invalidate both.
Notify the outer layer of devices that have arrived and devices
that have gone away. *Finally*, when this is done, search the
softc's database of Fabric devices and perform logout/login actions.
The Qlogic f/w maintains logout/login for all local loop devices.
We have to maintain logout/login for fabric devices- total PITA.
Expect to see this area undergo more change over time.
1999-07-02 23:06:38 +00:00
Matt Jacob 77d4e8361d Roll revision levels. Move DEFAULT_LOOPID definition to platform files.
Change some fcp parameter structures such that we can get the portid
(24 bit value), get both node and port WWN, know whether we're on a fabric
or not, note whether we've ever seen the loop up, and note the current
state of the loop.

Replace the isp_pdb_t structure in fcparams with a reduced cost structure
that maintains a static relationship to 'Target', but can have the actual
loop ID used change (in case, post LIP, we discover things have moved
around). This also retains portid and node/port WWNs.  This array gets
larger if we have fabric support compiled in.

Note special loop IDs that are invariate for this device- FL_PORT_ID
(0x7e) which tells us if there's a fabric controller present, FC_PORT_ID
and FC_SNS_ID (fabric controller port and fabric SNS server port). We don't
use the latter two for anything. IDs above FC_SNS_ID up through 255 are
available for mapping fabric devices to 'target' ids.

Add in a config define to set FC full duplex mode. Add in a define to
recognize the Qlogic 2200 boards. Add comments about ISPCTL commands.
Add and change some ISPASYNC enumes.
1999-07-02 22:46:31 +00:00
Matt Jacob fc9961b5dd Add in SNS and Fabric login/logout commands. Clean up ICBOPT defines.
Remove INVALID_PDB_OPTIONS defines. Define generic SNS request and
response structures and the bare minimum GAN and GP3 subcommands.
1999-07-02 22:31:11 +00:00
Matt Jacob 8df9252043 This file is now obsolete. 1999-07-02 22:26:10 +00:00
Matt Jacob 956d0a937a roll firmware for FC 1999-07-02 17:07:39 +00:00
Greg Lehey 126152b05d Add keywords 'mirror' and 'stripe' when not in kernel mode. 1999-07-02 07:58:09 +00:00
Greg Lehey e65333e92e Allow to unconditionally up subdisks with the -f option.
Change returns for failed state changes from EINVAL to EBUSY.

Suggested-by:  Bernd Walter <ticso@cicely.de>
1999-07-02 07:57:28 +00:00
Greg Lehey 7d6715c52c Change the type of the freelist sectors variable to u_int64_t in
order to ensure that initializers will be of correct type.
1999-07-02 07:56:47 +00:00
Peter Wemm 820f359d7e Change the cast in pci_map_port() from u_short * to pci_port_t * so it
compiles cleanly on the Alpha.  (On the alpha, the port type is an int,
not a short).
Cast a couple of pointers to ints via 'uintptr_t' rather than 'unsigned
int' since uintptr_t is long (64 bit) on Alpha, as are pointers.
1999-07-02 04:17:16 +00:00
Peter Wemm f078b1e075 #include <machine/md_var.h> to bring the prototype for
alpha_platform_assign_pciintr() into scope (!).
1999-07-01 22:58:03 +00:00
Peter Wemm 4180e07c29 Tidy up a few warnings when used without splash. (things defined but not
used)
1999-07-01 20:43:03 +00:00
Peter Wemm ea24629773 Fix warnings on the Alpha. 1999-07-01 20:29:25 +00:00
Peter Wemm e240133cfa Fix printf int/long format problems on the Alpha. 1999-07-01 20:01:03 +00:00
Kazutaka YOKOTA a6c5d058bc Allocate the port resource when attaching the keyboard controller,
rather than when the individual child device is attached.
1999-06-29 17:35:09 +00:00
Kazutaka YOKOTA f94ae09657 Skip the device if it is disabled, when searching for a serial port
to be used for the kernel console in sccnprobe().
1999-06-29 17:34:16 +00:00
Kazutaka YOKOTA 8c76a16644 Fill in tp->t_windowsize AFTER the call to (*linesw[tp->t_line].l_open)(),
rather than BEFORE the call.  Otherwise the structure will be `zero'ed out
by l_open, which actually is ttyopen(), if !TS_OPEN.

PR: kern/12420
1999-06-29 17:30:33 +00:00
Greg Lehey 3252fdcd97 Lock buffer before calling strategy.
Idea-stolen-from:	peter (sys/dev/ccd/ccd.c revision 1.49)
1999-06-29 04:10:05 +00:00
Greg Lehey 839832f8d0 close_drive:
Correct race condition between caller and daemon.

  Tripped-over-by:	Zach Heilig <zach@uffdaonline.net>
			Bernd Walter <ticso@cicely.de>
			Niels Chr. Bank-Pedersen <ncbp@bank-pedersen.dk>
1999-06-29 04:08:51 +00:00
Greg Lehey 7d0e3c6f72 Correct type of intializer for (undocumented) cdevsw.d_parms.
Submitted-by:	peter
1999-06-29 04:07:55 +00:00
Dag-Erling Smørgrav af5c746a49 Use the correct value for banksize so splash_pcx works in LFB modes. 1999-06-28 13:52:29 +00:00
Peter Wemm eb7fc512af Don't #include i386/isa/isa_dma.h - it's in isa/isavar.h now. This
driver is probably not far from being MI now anyway.
1999-06-28 09:19:58 +00:00
Nick Hibma fd7a5fcd8e Add MultiTech Atlas modem 1999-06-27 22:28:02 +00:00
Nick Hibma 616ff839aa Remove superfluous semi-colon 1999-06-27 22:24:20 +00:00
Nick Hibma 178e4460ef Replace usbd_device_set_desc by device_set_desc_copy 1999-06-27 09:42:40 +00:00
Peter Wemm b52ab6b545 Initialize and hold locks for ccd generated bufs..
Obtained from: Matt Dillon <dillon@backplane.com>
1999-06-27 09:28:43 +00:00
Nick Hibma 25d210e317 Remove unused variable and computation, possibly leading to a
divide by zero fault.

Possible fix for PR12041

PR:		12041
Submitted-By:	J.Hudson@massey.ac.nz
Reviewed-By:	nsouch
1999-06-26 14:42:17 +00:00
Nick Hibma 7678b59a40 Change 'device' to 'self', to be more like the rest of the code 1999-06-26 12:55:25 +00:00