Commit Graph

8019 Commits

Author SHA1 Message Date
Scott Long
7419815d60 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
2002-09-25 05:00:25 +00:00
Jeff Roberson
37ab0e0d81 - Use vrefcnt() instead of v_usecount. 2002-09-25 02:42:43 +00:00
Paul Saab
a7d681929a Add some PCI id's for fxp. I've only tested 0x103B, but the Intel
Linux driver defines 0x103[B-E] so add those as well.

Obtained from:	Intel Linux e100 driver
MFC:		Immediately if re@ allows it, otherwise after 4.7-RELEASE
2002-09-24 23:13:38 +00:00
Matt Jacob
301472c20b Code cleanup: use mpt_prt instead of device_printf. 2002-09-24 21:33:43 +00:00
Prafulla Deuskar
587edcdc95 Corrected license in the source files. It should say "MUST" instead of "MAY".
MFC after:	2 days
2002-09-24 16:27:59 +00:00
Yoshihiro Takahashi
9601a29654 Move the com_emr register definition to sioreg.h. 2002-09-24 02:35:57 +00:00
Matt Jacob
7dec90bcf9 Parameterize MPT_MAX_REQUESTS based upon device type (FC has Global Credits
of 1024- Ultra4 256). Rename 'requests' tag to 'request_pool' for clarity.
Make sure we do correct xpt_freeze_simq/CAM_RELEASE_SIMQ if we run out
of chip resources.

MFC after:	6 days
2002-09-23 19:41:10 +00:00
Alfred Perlstein
4f492bfab5 use __packed. 2002-09-23 18:54:32 +00:00
John Baldwin
b8581e0d56 Now that we only probe host-PCI bridges once, we no longer have to check to
see if we have been probed before by checking for a pciX bus device.
2002-09-23 18:14:31 +00:00
Alfred Perlstein
744ae3e66a use __packed/__aligned rather than GCC-specific __attribute__. 2002-09-23 06:35:33 +00:00
Alfred Perlstein
ebc82cbbf0 s/__attribute__((__packed__))/__packed/g 2002-09-23 06:25:08 +00:00
Matt Jacob
77e22cb706 Wads more cleanup...
In mpttimeout, call mpt_intr just on the offchance that we missed
an interrupt. We can check to see whether or not the command that
is timing out got completed.

When we *do* decide to timeout a command, set the command state to
REQ_TIMEOUT and then invoke another timeout (hz/10)- mpttimeout2.
This allows us to catch a couple cases we've seen where the command
we timed out on in fact is ready to be completed by the firmware.
In any case, it's only after mpttimeout2 is called that we actually
take down the private state and free the request itself. CAM has
been notified in mpttimeout anyway. This whole area should be redone,
but that will take 105% of my available game time for this month.

Fix a couple of missing (and not useful, at presnet) CAMLOCK_2_MPTLOCK
and MPTLOCK_2_CAMLOCK locations.

Split mpt_notify into mpt_ctlop, which handles all reply completions
that have 0x800000000 or'd into the ContextID. This function can, in
fact, call mpt_event_notify_reply, which handles the traditional
async event notifications. While we're at it, put in the extremely
important (but currently untested) code that send back an Ack to
an Event Notification (if the Event Notification is marked with
AckRequired). Note that an Ack also generates another ctlop completion,
tra la.

Fix up mpt_done substantially to try and get how we plug into CAM
correctly done. Remove bogus CAM_RELEASE_SIMQ settings.

Do some cleanups in mpt_action that are related to speed negotiation
for Ultra4 cards. This is an area that is still quite fragile and
worrisome as config data being read back often doesn't make sense or
jibe with the documentation.

At any rate, after these changes were done, I was finally able to
get Lars Eggert's dual 320M disk system to stay up under load all
weekend- hopefully we're in good enough for now shape.

MFC after:	1 week
2002-09-23 05:25:59 +00:00
Matt Jacob
aca01e3897 Recognize the single channel 2Gb card (FC919)- thanks to LSI Logic for
pointing this out.

In mpt_intr, don't try and pop a reply queue element out *unless*
the interrupt status says you might have one.

MFC after:	1 week
2002-09-23 05:16:00 +00:00
Matt Jacob
daa46fadd9 We do not need to expose mpt_notify outside of mpt_freebsd.c.
MFC after:	1 week
2002-09-23 05:14:38 +00:00
Matt Jacob
0424fb537e When freeing a request, zero out the sequence number.
Define the CFG_DAGA_OFF offset as 128 bytes instead of 40- gives us
a more reasonable headroom.

When reading a config page, zero out the entire request area- not just
the length of the request. This is because we cleverly (cheezily) return
configuration data back into the allocated request area, so it's nice
to make sure we start with a clean area to write on.

MFC after:	1 week
2002-09-23 05:14:02 +00:00
Matt Jacob
66cbe912a9 Remove ISP_DMA_ADDR_T definition.
Instead, based upon whether ISP_DAC_SUPPORTED is defined, typedef
isp_dma_addr_t appropriately.

If ISP_DAC_SUPPORTRED is defined, the DMA_WD2/DMA_WD3 macros do something
useful, else they define to '0'.
2002-09-23 05:09:23 +00:00
Matt Jacob
7e4bd1688b Add MBOX_INIT_REQ_QUEUE_A64/MBOX_INIT_RES_QUEUE_A64 definitions.
Define ispreq64_t to be the same as ispreqt3_t.
2002-09-23 05:04:16 +00:00
Matt Jacob
f777264584 Redo dma tag creation to correctly reflect the boundary and segment
limitations inherent to the isp1000 on SBus cards.
2002-09-23 05:03:34 +00:00
Matt Jacob
435a93378f Re-specify the bus space creation such that if we have ISP_DAC_SUPPORTED
defined, we set the address space limitation to BUS_SPACE_UNRESTRICTED,
otherwise to BUS_SPACE_MAXADDR_32BIT.

If we have a 1240, ULTRA2 or better, or an FC card, the boundary limit
is BUS_SPACE_UNRESTRICTED and segment limit is BUS_SPACE_MAXADDR_32BIT.

The older 1020/1040 cards have boundary and segment limits of
BUS_SPACE_MAXADDR_24BIT.
2002-09-23 05:02:53 +00:00
Matt Jacob
9f06346c13 Fix buglet in A64 CTIO3 structure copy. 2002-09-23 05:00:37 +00:00
Matt Jacob
6ce5711b35 Remove ISP_DMA_ADDR_T define (see ispvar.h)
Add in commented out:

+/* #define     ISP_DAC_SUPPORTED       1 */
2002-09-23 05:00:14 +00:00
Matt Jacob
caec294571 If we have a 1240 or an ULTRA2 or better card, use MBOX_INIT_RES_QUEUE_A64
(preparation for DAC/A64 support)
2002-09-23 04:59:42 +00:00
Scott Long
c57c56c4a1 The ahc driver should only have one devclass, not one for each bus
attachment.

Submitted by:	too many people to count
MFC after:	3 days
2002-09-22 23:03:31 +00:00
John Polstra
62f1ea9c96 Fix a couple of longstanding typos which would have made a
statement fail to compile if it weren't inside "#ifdef
__brokenalpha__".

Submitted by:	Birger Toedtmann <birger@takatukaland.de>
MFC after:	2 weeks
2002-09-22 19:27:07 +00:00
John Polstra
ea13bdd522 Follow the lead of recent changes in the 3com Linux driver by
disabling memory write invalidate unconditionally.  It looks like
they've decided that MWI just doesn't work with these devices.
Also, remove now-irrelevant code that set PCI write boundary values
based on the cache line size.

MFC after:	2 weeks
2002-09-22 18:58:58 +00:00
John Polstra
8287860e04 Set up the BCM570x chip's DMA Read/Write Control register more
correctly.  This fixes the "watchdog timeout -- resetting" errors
seen on Dell 2650 systems.

MFC after:	1 month
2002-09-22 18:27:29 +00:00
Peter Grehan
a0c6726472 Initialize fwsectors/fwheads to allow the DIOCGFWSECTORS and
DIOCGFWHEADS ioctls to return meaningful values to disklabel/newfs

Approved by: phk
2002-09-22 10:07:18 +00:00
Poul-Henning Kamp
c8423e9702 Move the com_scr register address definition over with the other seven.
Approved by:	bde
2002-09-22 08:51:31 +00:00
Mark Murray
a0a95acece Remove #ifdef'ed Giant mutex wrappers round debugging statements. 2002-09-21 21:44:19 +00:00
Nicolas Souchu
44e6ce01b9 Cleanup of amdpm(4).
Add of NVIDIA nForce (nfpm) smbus support.

Obtained from:	Thomas D. Dean <tomdean@speakeasy.org>
2002-09-21 21:43:49 +00:00
Mark Murray
b0186e2c5c No functional change. Fix comments and whitespace. 2002-09-21 21:40:02 +00:00
Mark Murray
963b82c64c Everywhere else, an argument passed to a device containing flags
is called "flags". Make it so here.
2002-09-21 17:28:17 +00:00
Hidetoshi Shimokawa
ba68cdd304 don't include bus_dma.h which doesn't need. 2002-09-21 15:05:22 +00:00
Hidetoshi Shimokawa
b24db4ddd9 remove unused code. 2002-09-21 14:48:07 +00:00
Poul-Henning Kamp
668b05c376 Remove empty #if*/#endif clauses. 2002-09-21 08:44:51 +00:00
Peter Grehan
601385b7ca Add missing semicolon 2002-09-20 23:26:07 +00:00
Poul-Henning Kamp
7812d86f03 (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.
2002-09-20 19:36:05 +00:00
Poul-Henning Kamp
812967db72 This file does not <sys/disklabel.h>
Sponsored by:	DARPA & NAI Labs.
2002-09-20 18:15:40 +00:00
Poul-Henning Kamp
c6ff03e2df Remove unused #includes: <sys/disk.h> <sys/devicestat.h> and <sys/sysctl.h>
Sponsored by:	DARPA & NAI Labs.
Approved by:	sos
2002-09-20 18:08:57 +00:00
Poul-Henning Kamp
29c02e22c3 Reduce <sys/disklabel.h> poisoning a bit.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:14:48 +00:00
Poul-Henning Kamp
6d8e16f322 Include <sys/ioccom.h> directly, rather than indirectly through
<sys/disklabel.h>

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:59:14 +00:00
Poul-Henning Kamp
aa5330bbb4 Remove even more Copy&Pasted sets of #includes. 2002-09-20 16:53:19 +00:00
Poul-Henning Kamp
dbd2c365c9 Remove unused #includes. Looks amacingly like the exact same set
as I just removed from ncr53c500_pccard.c.

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:51:09 +00:00
Poul-Henning Kamp
90bf37e5e9 Remove #include of <sys/disklabel.h> (and a few other unused #includes I
noticed while here).

Sponsored by:	DARPA & NAI Labs.
2002-09-20 16:49:36 +00:00
Martin Blapp
351267c186 Fix the support for the AN985/983 chips, which do not set the
RXSTATE to STOPPED, but to WAIT. This should fix hangs which
could only be solved by replugging the cable.

Submitted by:	jhb
Reviewed by:	phk
MFC after:	2 weeks
2002-09-20 15:18:13 +00:00
Martin Blapp
7e346229db Enable the automatic TX underrun recovery for the ADMtek chips.
This solves cvsup update on my laptop which aborts after a while
without this patch.

PR:		34236
Reviewed by:	phk
MFC after:	2 weeks
2002-09-20 15:16:06 +00:00
Poul-Henning Kamp
f90c382c0c 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.
2002-09-20 12:52:03 +00:00
Poul-Henning Kamp
46714777f5 Retire now unused DIOCGDVIRGIN kludge.
Sponsored by:	DARPA & NAI Labs.
2002-09-20 09:31:14 +00:00
Peter Wemm
531facba39 move <machine/iic.h> and <machine/smb.h> to <dev/iicbus/iic.h> and
<dev/smbus/smb.h> - there is nothing MD about these ioctl definitions.
2002-09-19 03:25:46 +00:00
Søren Schmidt
cea0b8e060 Add support for the VIA 8235.
Submitted by: Jason Dambrosio <jason@wiz.cx>
2002-09-18 09:39:37 +00:00