Commit graph

7994 commits

Author SHA1 Message Date
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
Katsushi Kobayashi a9c9b6989c Firewire device support for Apple eMac with PPC kernel.
Contributed by Peter Grehan <grehan@freebsd.org>
2002-09-17 12:50:43 +00:00
Søren Schmidt 568f03ed88 Fix the clockprobe test on the Sil 680 2002-09-16 09:37:26 +00:00
Josef Karthauser 56c4ff5427 Deprecate the USB_SETDEBUG IOCTL as debug levels can now be set
using sysctl.
2002-09-15 22:35:58 +00:00
Poul-Henning Kamp c3bdb2f779 Suitably shrink a comment so it applies again.
Submitted by:	bde
2002-09-15 21:25:55 +00:00
Eric Anholt 81ac2d2606 Fix i810 after i830 commit.
Submitted by:	David Dawes <dawes@XFree86.Org>
2002-09-15 08:43:23 +00:00
Bruce Evans ab85003bf5 Fixed breakage from removing the used include of <sys/buf.h> in the
previous commit:
Include <sys/mutex.h> and its prerequisite <sys/lock.h> instead of
depending on namespace pollution in <sys/buf.h>.  Only do this in the
__FreeBSD_version > 500000 case although the __FreeBSD_version < 500000
case has already rotted.
2002-09-15 08:21:14 +00:00
Poul-Henning Kamp 2f11d560cc remove #includes of <sys/bio.h> where not needed. 2002-09-14 18:59:32 +00:00
Poul-Henning Kamp 296bbb4cfb FreeBSD -current doesn't need <sys/buf.h> or <sys/bio.h>. 2002-09-14 18:58:36 +00:00
Katsushi Kobayashi 3c60ba66c4 Initial import for IEEE1394 OHCI chipdet device driver and SBP-2 (Serial
Bus Protocol 2:SCSI over IEEE1394) support for CAM.
2002-09-13 12:31:56 +00:00
Poul-Henning Kamp 02aad38c79 Fix a bug were a struct bio was freed and certain members subsequently
examined.  Use biowait() instead of DIY.
2002-09-13 11:37:38 +00:00
Maxime Henrion 2dfbcdd46d Fix another two printf() format errors which weren't warned
about because the bio_blknos were bogusly casted to long long.
2002-09-13 09:37:44 +00:00
Maxime Henrion 92faa7b50f Fix another printf() format error which wasn't warned about
because the bio_blkno was bogusly casted to an int.
2002-09-13 09:19:55 +00:00
Maxime Henrion f368af933d Fix a printf() format error on 64 bits architectures.
Also fix some style bugs on the same line.
2002-09-13 09:16:06 +00:00
Eric Anholt ea3796796a Fix an i830/i845 test that shouldn't get hit in normal use and remove a printf.
Submitted by:	David Dawes <dawes@XFree86.Org>
2002-09-13 04:17:28 +00:00
Joerg Wunsch 9a5e3ddb2d Pass the physical instead of the logical block number in
bp->bio_pblkno.  Otherwise, all formats not using 512 byte
physical sectors got screwed.
2002-09-12 20:53:50 +00:00
Søren Schmidt a7089c2c4c Add preliminary mostly untested support for the Silicon Image Sil680 chip. 2002-09-12 15:25:59 +00:00
Thomas Quinot 9bdb4a0a3f Change a couple of splcam() calls that do not make sense in atapi-cam
(what we want to mask is the ATA interrupts, which run at level splbio),
and add interrupt masking around the statement that modifies the
request queue for a SIM.

This resolves problems reported by users under heavy ATAPI load.

Reviewed by:	roberto
2002-09-12 15:15:33 +00:00
Søren Schmidt 35ca7a483a Rearrange where to get the ATAPI magic sequence.
Submitted by: Benjamin Close <cisbjc@cs.unisa.edu.au>
2002-09-12 14:32:33 +00:00
Søren Schmidt 175f0ce5a4 Wait for drive to become ready if its in progress of loading..
Based on patch in PR-42659, but done somewhat differently.

PR: 42659
2002-09-12 13:55:24 +00:00
Søren Schmidt 9d54441f7f Dont hang in atprq on poll_dsc command.
This is a temporary fix until I get proper locking done.

Submitted by: iedowse@maths.tcd.ie
2002-09-12 13:53:33 +00:00
Eric Anholt 3080733f2e Add AGP support for Intel i830M and i845 thanks to patches from moto kawasaki
<kawasaki@mbg.sphere.ne.jp> and David Dawes <dawes@XFree86.org>.
2002-09-12 04:23:18 +00:00
Andrew R. Reiter b2c6ac5b2b - Forgot to remove cardattached declaration in revision 1.22. 2002-09-10 16:50:06 +00:00
Warner Losh b5b0634309 reprobe not needed here either 2002-09-10 06:37:56 +00:00
Warner Losh 17a39a01e9 Remove more bogus reprobe code. I don't think it is needed here either. 2002-09-10 06:37:02 +00:00
Warner Losh 2d7a3e94bd o Dike out the bogus reprobe stuff. It was getting in the way of newbus' own
reprobe code working.  This bogusness was thrust upon me.
o Don't delete the device if no drivers attach.  I had thrust this bogusness
  upon others.

These two changes make kldload of a pccard driver work again.
2002-09-10 06:32:18 +00:00