Commit Graph

72704 Commits

Author SHA1 Message Date
rearnsha 0765a88c26 Define _ARM_ARCH_6, _ARM_ARCH_5 and _ARM_ARCH_4T, based on
architecture defines passed from the compiler.

Define RET and RETc macros for return and conditional return.  If BX is
available in the current instruction set then make use of it.

Note: these really are from the compiler's -march/-mcpu flags, not
from the kernel config, so they can be relied on in user space.
2004-08-21 10:59:41 +00:00
rearnsha a64bc9e882 Define THUMB_INSN_SIZE. 2004-08-21 10:53:36 +00:00
he 1e7492c638 Make this compile again by removing a now-unused local variable
and picking up cmd_iot from the new register struct instead of the
channel struct.
2004-08-21 10:09:21 +00:00
thorpej 09662eaa73 Register description for SATA port multipliers. 2004-08-21 02:25:26 +00:00
thorpej 5373bdd103 - Move to48() to atareg.h and rename it atacmd_to48().
- Add an atacmd_tosataq() that converts a 32-bit command to a Native
  SATA Queued command.
2004-08-21 02:17:07 +00:00
thorpej 218dbb60a6 Make some functions referenced only in wdc.c private to that file. 2004-08-21 01:51:46 +00:00
thorpej 8eaae3f96b Eliminate some gratuitous spl frobbing in atabus_thread(). 2004-08-21 00:48:32 +00:00
thorpej 335b799580 atastart() (called only at splbio(), and from interrupts) can change
drive_flags, to make sure all drive_flags manipulations are done at
splbio().
2004-08-21 00:28:34 +00:00
thorpej 2aaf643e25 - atabus_detach(): Manipulate ch_flags at splbio().
- ata_reset_channel(): Assert that we're at splbio() when called.
- Sprinkle some comments about functions that must be called at splbio().
2004-08-20 23:50:13 +00:00
thorpej 4af8216045 WDC_DIAGNOSTIC -> ATA_DEBUG 2004-08-20 23:36:52 +00:00
thorpej e975b9caee - Add an (*ata_reset_channel)() member to ata_bustype.
- Add an ata_reset_channel() function that performs the common parts
  of resetting an ATA channel, which uses the (*ata_reset_channel)()
  callback to do the heavy lifting.  Adjust callers to use ata_reset_channel()
  instead of wdc_reset_channel().

This removes the last wdc-specific code from ata.c!
2004-08-20 23:26:53 +00:00
thorpej bd165f8e47 Use ANSI function decls for atabus open/close/ioctl. 2004-08-20 22:26:23 +00:00
thorpej c5adb42199 wdcreg.h is not needed here any more. 2004-08-20 22:19:00 +00:00
thorpej 56e2a255b5 Move common parts of attaching an ata_channel to a new ata_channel_attach()
function.
2004-08-20 22:17:06 +00:00
thorpej 3234a02f48 Move atabusconfig() to ata.c. 2004-08-20 22:02:40 +00:00
nathanw 8b1b7c1c67 Check DDB before KGDB; if both are enabled, it's more useful to go to
DDB, because you can get to KGDB from there, but not the other way
around.
2004-08-20 21:38:35 +00:00
nathanw 584b896885 Nothing's wrong with having DDB and KGDB in the same kernel. 2004-08-20 21:33:57 +00:00
thorpej 51c34ebedf In ata_get_params(), use the (*ata_exec_command)() available from the
ata_bustype rather than using wdc_exec_command() directly.
2004-08-20 20:53:20 +00:00
thorpej 2606542c7b - Add an atac_bustype_ata member to atac_softc to hold a pointer to
the ata_bustype for the controller.  Fill it in and use it instead
  of referencing wdc_ata_bustype directly.
- Add an atac_atapibus_attach member to atac_softc to hold a pointer
  to the function that attaches the ATAPI bus for the controller.  Fill
  it in and use it instead of referencing wdc_atapibus_attach directly.
2004-08-20 20:52:31 +00:00
thorpej ce56a7e194 Also set the AT_XFDONE bit as appropriate. 2004-08-20 17:37:16 +00:00
thorpej 709a2d87fc Rename the ata_bustype "ata_reset_channel" member to "ata_reset_drive"
to reflect the new reality after Manuel added the bus reset ioctls.
2004-08-20 17:19:44 +00:00
yamt a92a80cf63 for offloc, use MII_OFFSET_ANY rather than abusing MII_PHY_ANY. 2004-08-20 15:21:24 +00:00
thorpej 26dfa7dd35 Comment out atabus; no ATA controllers or devices are configured in this
kernel.
2004-08-20 15:15:26 +00:00
kent 2edd85fb18 Check power states after codec reset. This change fixes a
resume problem on some boards.
Patch provided by Joachim Thiemann in PR kern/26457
2004-08-20 14:36:13 +00:00
wennmach 1b35cf3d9a o Split copyright into mycroft and UCB parts
o remove advertising clause from UCB part
2004-08-20 14:12:52 +00:00
tron 139c8b8dfc Pass correct "mbuf" pointer to BPF framework. 2004-08-20 07:46:21 +00:00
thorpej 9cc521a148 Move most of wdc_softc into a new atac_softc structure that contains
info common to all types of ATA controllers.
2004-08-20 06:39:37 +00:00
simonb 2fe6a47d97 Add dependancies on assym.h for some assembly files so that
"make -j <bignum>" works without having to do a "make depend" first.
2004-08-20 05:34:47 +00:00
enami 9e4955fd5e Fix compilation error introduced by prevoius commit. 2004-08-20 00:37:07 +00:00
thorpej 2926431abf Use ANSI function decls and "static". 2004-08-19 23:30:09 +00:00
thorpej 1600c8b8cd - Add and use a CHAN_TO_WDC() macro to get the wdc_softc from an
ata_channel.
- Add and use a CHAN_TO_WDC_REGS() macro to get the wdc_regs from an
  ata_channel.
- Add and use a CHAN_TO_PCIIDE() macro to get the pciide_softc from an
  ata_channel.
- Add and use a CHAN_TO_PCHAN() macro to get the pciide_channel from an
  ata_channel.  (This one just hides a cast, and is really just for
  consistency with the others.)
2004-08-19 23:25:35 +00:00
christos 0f7d471853 Factor out the hand-crafting of mbufs from the interface files. Reviewed by
gimpy. XXX: I could have used bpf_mtap2 on some of the new functions, but I
chose not to, because I just wanted to do what amounts to a code move.
2004-08-19 20:58:23 +00:00
christos 396c380971 - ansify
- remove unnecessary casts
- change caddr_t to void *
- no functional change.
2004-08-19 18:33:24 +00:00
thorpej 65193a3b71 Protect against multiple inclusion. 2004-08-19 17:56:57 +00:00
chs 80c0e76172 implement pmap_pvo_reclaim(), which steals an existing non-wired pvo entry
for reuse, and use this in pmap_pvo_enter() when we can't allocate a new one.
2004-08-19 15:31:57 +00:00
drochner 6860e77f9d include <sys/device> explicitely, found by Havard Eidnes 2004-08-19 15:12:36 +00:00
drochner f2e99ab844 support rescan / manual detach
This code needs cleanup, at least a reasonable linked list
implementation (fixed a bug in detach_card() in the process which
left a dangling pointer around).
Also removed a questionable and undocumented use of the parent's
device unit number as locator value.
(As with the pcmcia code: someone please review wrt powerup/down etc.)
2004-08-19 14:50:52 +00:00
christos 43f6a1ad3b PR/26210: Matthew Mondor: Since revision 1.14 when net-2 was merged,
the code to do receive packet accounting has been disabled for no apparent
reason. Re-enable it.
2004-08-19 12:48:42 +00:00
junyoung 3d45791c36 Rename bootparams to boot_params for consistency. 2004-08-19 10:34:36 +00:00
yamt bee0b74932 remove a "proc botch" debug printf. ok'ed by Jonathan Stone. 2004-08-18 23:44:47 +00:00
dyoung c9108ddfc8 Hubert Feyrer points out that hw.ath.countrycode really ought to
be writeable.  Make hw.ath.outdoor writeable while I am here.
2004-08-18 21:59:39 +00:00
tsutsui efa3e6b66b Remove bogus TABs. (from OpenBSD) 2004-08-18 14:47:25 +00:00
drochner de8db0c004 also provide an example how a pci driver LKM looks
(This is just a dummy driver which doesn't touch the hardware.)
2004-08-18 14:06:13 +00:00
drochner b1a9bed356 add an LKM for "wi at pcmcia" as an example for the new MOD_DRV LKM type 2004-08-18 13:12:07 +00:00
drochner 4157766364 add a "drvctl" pseudo-device as userland interface to the autoconf
rescan() and detach() functions
2004-08-18 12:19:29 +00:00
drochner 890158d024 Allow to rescan and detach by user request, using the new autoconf
functions.
For later rescans (eg after a driver LKM was loaded) to make sense,
don't consider it an error if no driver was attached on the initial
bus scan.
Someone who understands the enable/disable/powerup/down stuff please
review this.
2004-08-18 12:01:13 +00:00
drochner a758a2aba6 allow to detach child devices and (optional selectively) bus rescans,
using the new autoconf functions
2004-08-18 11:54:47 +00:00
drochner 6ea832578d Use the new autoconf functions to rescan busses and detach devices
on user request.
This duplicates the functionality provided by a private ioctl
interface (accessible through scsictl(8)), but in a more generic way.
2004-08-18 11:50:59 +00:00
drochner c67a72f6ff make PCI devices attachable/detachable (as far as the particular drivers
allow), and allow to rescan a bus selectively (ie only the device/
function I'm looking at)
2004-08-17 23:20:10 +00:00
drochner d95b59fae8 add a new "DRV" LKM type, and some glue code to make it use the new
autoconf capabilities
2004-08-17 22:38:50 +00:00