Commit Graph

515 Commits

Author SHA1 Message Date
ad
b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
wiz
19c7b24184 Spell "schedule" correctly. From Zafer Aydogan. 2006-12-25 18:36:05 +00:00
bouyer
93df930ebb It's 3.0Gb/s, not GB/s. Pointed out by Thomas E. Spanjaard. 2006-11-30 23:07:31 +00:00
dogcow
371dea6737 revert last change, as havard's fix is more general. 2006-11-27 20:29:12 +00:00
dogcow
ec21dc99eb #include <sys/device.h> to fix build failure on sparc64.
(why only sparc64? no idea.)
2006-11-22 22:14:23 +00:00
bouyer
6c04cd11cb Cosmetic: remove one ":" from the port status string, it looks better this
way.
2006-11-22 17:51:02 +00:00
bouyer
dcf3bce253 In sata_reset_interface() return only DET bits of SStatus, as the
return value is compared against SStatus_DET_*
2006-11-22 17:49:12 +00:00
bouyer
37152360bf Move part of wdc_sataprobe() to sys/dev/ata/sata_subr.c so that it can be
shared with non-wdc SATA controllers.
2006-11-20 23:42:21 +00:00
christos
168cd830d2 __unused removal on arguments; approved by core. 2006-11-16 01:32:37 +00:00
bouyer
4a1c74e813 Yet another broken seagate drive. 2006-11-09 19:43:05 +00:00
thorpej
f0c0486c7b Use the new prop_dictionary_util functions. 2006-10-26 05:04:18 +00:00
bouyer
c55d38dab6 Exclude wdc_sataprobe() when no SATA controllers are present. Fix
build of *_TINY kernels.
2006-10-25 20:14:00 +00:00
bouyer
80b1feec65 Add sata registers to struct wdc_regs. Add wdc_sataprobe(), a function
probing drives using the standard SATA registers; taken from various
PCI sata drivers. Export wdc_drvprobe() too.
2006-10-25 17:33:02 +00:00
thorpej
3c6ae35ab2 - Add a new disk ioctl (DIOCGDISKINFO) to get the disk-info dictionary
for the disk.
- Add a new function, disk_ioctl(), that does generic disk ioctl handling.
  DIOCGDISKINFO is handled here now, and others will be added in the future.
- In the wd driver, fill in the dk_info member of struct disk and use the
  new disk_ioctl() function.
2006-10-25 04:04:45 +00:00
itohy
b1d32ad8f3 white space police 2006-10-15 00:00:00 +00:00
itohy
65b52f68a1 Add ATAPI Pioneer (info from Linux) and ATA TDK (I have one)
as exceptions of string byte order.
Add string byte order shuffling for big-endian platforms.
2006-10-14 23:54:14 +00:00
christos
4d595fd7b1 - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
2006-10-12 01:30:41 +00:00
itohy
f87d591722 A little effort against kernel bloat....
Exclude ATA DMA support if no ATA DMA capable drivers are compiled in.
2006-09-30 15:56:17 +00:00
xtraeme
9162ad5359 Typo: WCDD_SECURITY_FREEZE -> WDCC_SECURITY_FREEZE
Noticed by Sergey Svishchev.
2006-09-24 08:32:17 +00:00
jmcneill
f135e0d607 Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
2006-09-24 03:53:07 +00:00
thorpej
1edb40635e - Define disk information, disk geometry, and disk partition dictionary
schemas.  Disk information and disk geometry are designed to replace
  information currently conveyed to user space using struct disklabel.
- Add a dk_info member to struct disk; a reference to a disk information
  dictionary.  This dictionary is to be allocated and the reference stored
  in struct disk by individual drivers.
- disk_detach0() will release dk_info if non-NULL.
- Convert the wd(4) driver to stash geometry and other disk properties
  as the "disk-info" property in its properties dictionary.  This needs
  some cleanup, but will serve as an example of what to do with other
  disk drivers.
2006-09-22 04:48:38 +00:00
itohy
0a30900857 Add PIOBM (busmastering transfer using ATA PIO mode) support.
The PIOBM is used by only one driver (will be added later,
stay tuned) and intruduce an attribute "ata_piobm" so that
it will be conditionally compiled in.
The "ata_dma" (busmastering transfer using ATA DMA mode) and
"ata_udma" (busmastering transfer using ATA Ultra DMA mode)
attributes are also added for consistency, but unused for now.
2006-09-07 12:34:41 +00:00
christos
ca960afcce Oops, this is not ready yet. 2006-08-27 23:51:31 +00:00
christos
72c8baf57c Add missing initializer 2006-08-27 23:50:53 +00:00
lukem
755b4414f2 If there's any wd quirks in use, display them. 2006-08-01 07:19:07 +00:00
gendalia
109f1d8570 Add yet another broken 160GB seagate drive. Mine. ST3160021A. 2006-06-24 04:49:40 +00:00
bouyer
02ace2fe6c Adjust quirk entry for seagate drives. Should fix kern/33637 by Shigeya
Suzuki.
2006-06-05 18:22:23 +00:00
bouyer
38038ac6c0 Add yet another broken 160Gb seagate drive. I though we had found all of
them ... reported by Damian Lubosch on current-users.
2006-05-18 19:42:09 +00:00
elad
2867b68bc3 integrate kauth. 2006-05-14 21:42:26 +00:00
cherry
45a06839c0 Backing out previous commit for more review. 2006-04-05 02:40:57 +00:00
cherry
fb6529c627 Sleeps hard disk just before system shutdown.
Some hardware (eg: Apple iBooks) don't do this automatically
and the harddisk behaves as if the power plug were pulled.

Closes PR: kern/32766
2006-04-04 07:11:45 +00:00
thorpej
2be6494fc9 Use device_cfdata(). 2006-03-29 04:16:44 +00:00
thorpej
39cd836ee1 Use device_unit(). 2006-03-28 17:38:24 +00:00
thorpej
246504f91c Use device_parent(). 2006-03-25 22:55:55 +00:00
yamt
ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
thorpej
3ddf26777f Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
2006-02-20 16:50:36 +00:00
perry
fbae48b901 Change "inline" back to "__inline" in .h files -- C99 is still too
new, and some apps compile things in C89 mode. C89 keywords stay.

As per core@.
2006-02-16 20:17:12 +00:00
bouyer
6d97d9d080 For an IDENTIFY we have to wait for DRQ after issuing the command. 2006-01-22 16:40:56 +00:00
abs
2287ad2061 cast 16bit atap_capacity to u_int64_t before << 16. (assigned to
a u_int64_t variable). Fixes 1 to 2 TB disks in qemu. Tested with
1200GB and to a lesser extent 2047GB sparse files. For reference
an empty FFS1 filesystem on a 1200GB sparse file uses 19GB of disk.
2006-01-15 19:51:06 +00:00
yamt
2addc3084c remove B_EINTR as it isn't used anymore. 2006-01-07 00:26:58 +00:00
yamt
690d424f28 - add simple functions to allocate/free a buffer for i/o.
- make bufpool static.
2006-01-04 10:13:05 +00:00
yamt
9297401d54 - add ioctls to set/get disk bufq strategy.
- implement them for some drivers.
2005-12-26 10:36:47 +00:00
perry
93124077ae Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:27:29 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
martin
b1134bf887 Rework the funny "user_strat: No ioctl" error messages - the functions
have not been called user_strat for quite some time and the message is
confusing if you do not know the code.
2005-11-01 20:44:04 +00:00
yamt
aec75b1cc6 - change the way to specify a bufq strategy. (by string rather than by number)
- rather than embedding bufq_state in driver softc,
  have a pointer to the former.
- move bufq related functions from kern/subr_disk.c to kern/subr_bufq.c.
- rename method to strategy for consistency.
- move some definitions which don't need to be exposed to the rest of kernel
  from sys/bufq.h to sys/bufq_impl.h.
  (is it better to move it to kern/ or somewhere?)
- fix some obvious breakage in dev/qbus/ts.c.  (not tested)
2005-10-15 17:29:10 +00:00
riz
1ea801e91a Fix typo in comment from previous revision. 2005-09-05 22:55:31 +00:00
bouyer
9c2d1acf94 Use a pmatch(9) expression which should catch all present and future
seagate drives larger than 200GB for the WD_QUIRK_FORCE_LBA48 quirks.
Based on infos from
http://www.seagate.com/support/kb/disc/howto/interpret_model.html
2005-09-05 21:09:08 +00:00
bouyer
f0a1379350 Add quirk for ST3200826A. From rudolf (netbsd at eq.cz) on tech-kern. 2005-09-05 20:42:37 +00:00
bouyer
02f20190a2 wd->atabus->ata_bio() should handle the multi-sector PIO transfers just fine,
and in a better way than what is done in wddump() (which also does it
for DMA transfers, limiting the dump speed significantly). So remove
code splitting transfers in wd->sc_multi chunks from wddump(), and call
wd->atabus->ata_bio() with the whole transfers.

Problem reported by Frank Kardel, and patch tested by him.
2005-08-29 19:05:54 +00:00