Commit Graph

17725 Commits

Author SHA1 Message Date
thorpej 8aa1e65090 De-__P 2004-08-23 06:05:30 +00:00
thorpej 41e5f04cfd - Use ANSI function decls and make use of static. 2004-08-23 06:03:19 +00:00
thorpej 3e1286d67c - Use ANSI function decls.
- Sprinkle some static around.
- Sprinkle some const around.
2004-08-23 05:50:02 +00:00
thorpej 1a4f23700c Sprinkle static in a few places. 2004-08-23 05:39:46 +00:00
thorpej 4152bad13d Remove a comment that doesn't really make sense. 2004-08-23 05:38:15 +00:00
thorpej a1bb10ef89 Use static in a few more places. 2004-08-23 05:37:42 +00:00
thorpej 878ac57b19 Protect against multiple inclusion. 2004-08-23 04:45:18 +00:00
thorpej b8d3850087 Use ANSI function decls and more use of static. 2004-08-23 04:38:42 +00:00
thorpej c5ed5cafd4 Protect against multiple inclusion. 2004-08-23 04:30:28 +00:00
thorpej d0fcfb4c3a Use ANSI function decls and make use of static. 2004-08-21 23:48:33 +00:00
thorpej d17a849385 Use ANSI function decls and make use of static. 2004-08-21 22:48:18 +00:00
thorpej 383b485d9a Make the product table static. 2004-08-21 22:23:13 +00:00
thorpej 83a43d11ff Use ANSI function decls and make use of static. 2004-08-21 22:16:07 +00:00
thorpej 4deb00f885 Use ANSI function decls and make use of static. 2004-08-21 22:02:31 +00:00
nisimura 2ded7c9cd6 Redo the previous adjustment work. 2004-08-21 21:46:54 +00:00
nisimura e86b49fe3c Remove fluctuation of written name in alphabetical representation of
copyright holder.
2004-08-21 21:44:07 +00:00
thorpej f6b6634f46 Oops, missed one in last. 2004-08-21 21:30:58 +00:00
thorpej cb3eb355e7 Const poison scsipi_dtype(). 2004-08-21 21:30:29 +00:00
thorpej be6339d21a Use ANSI function decls and make use of static. 2004-08-21 21:29:39 +00:00
thorpej 3a4c3c0872 - De-__P.
- Use ANSI function decls.
2004-08-21 20:40:36 +00:00
thorpej 7994917f9b De-__P. 2004-08-21 17:41:18 +00:00
thorpej 6cb9b7482f Use ANSI function decls and make use of static. 2004-08-21 17:40:25 +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
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
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
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
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
thorpej 65193a3b71 Protect against multiple inclusion. 2004-08-19 17:56:57 +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
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
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