Commit Graph

363 Commits

Author SHA1 Message Date
tsutsui
9499107496 Use device_lookup_private() rathter than device_private(device_lookup()). 2008-06-08 18:34:06 +00:00
plunky
fc53820785 disk_destroy() is needed when the disk structure is no longer required,
this fixes PR kern/38131
2008-05-02 21:11:00 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
cube
7aa6248cdf Split device_t and softc for ATA devices, as well as wd(4). Other
cosmetic changes where appropriate.
2008-03-18 20:46:35 +00:00
bouyer
bd65ddcdb1 The Hitachi HDP725025GLA380 returns "aborted command" instead of
"id not found" when hitting the LBA48 bug, so also install the
LBA48 bug workaround on "aborted command" errors.
2008-02-29 21:51:38 +00:00
dyoung
f612df5fb6 Use PMF_FN_ARGS, PMF_FN_PROTO. 2008-02-29 06:38:28 +00:00
drochner
c0adcb9cf8 use pmf again to register the shutdown handler, instead of
shutdownhook_establish()
2008-02-28 14:40:17 +00:00
drochner
e4b37a874e put back the old shutdown handlers to flush the disk cache,
the pmf API can't deal with all the different suspend/resume/reboot
cases well yet, so better keep suspend/resume and reboot/halt/poweroff
clearly seperated
2008-02-21 21:52:06 +00:00
ad
4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
joerg
0adaef6553 Restore suspend handler. Put the disc into standby on suspend and for
powerdown, but not for normal halt or reboot or panic. Fixes PR 37508.
2007-12-18 15:30:40 +00:00
jmcneill
f2fa8d82cf Make this compile again. 2007-12-11 02:02:31 +00:00
jmcneill
eded1e0324 Disable the wd_suspend power handler on the proper branch, workaround for
kern/37508
2007-12-11 01:52:18 +00:00
jmcneill
4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
itohy
cf3882284c more KNF changes 2007-11-07 08:59:03 +00:00
itohy
18f935c281 KNF or make it compile by gcc 2 2007-11-07 08:56:41 +00:00
jnemeth
a04503ddd4 PR/37251 - Brian Buhrow -- FORCE_LBA48 on seagate drives larger then 1TB 2007-10-31 09:51:20 +00:00
ad
a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +00:00
ad
2af68666da Merge disk init changes from the vmlocking branch. These seperate init /
destroy of 'struct disk' from attach / detach.
2007-10-08 16:41:05 +00:00
bouyer
cf9d41447f Add a workaround for drives with the LBA48 bug:
if we get a "ID not found" error for a transfer crossing LBA48_THRESHOLD,
and the drive is larger than 128GB, automatically add WD_QUIRK_FORCE_LBA48
to the drive's quirks and retry the transfers.
Hopefully this will obsolete the WD_QUIRK_FORCE_LBA48 quirk list ...
2007-09-16 18:41:47 +00:00
jnemeth
2c21568896 yet more caddr_t fallout 2007-09-05 05:36:19 +00:00
taca
324019adc6 Make it compile with WD_SOFTBADSECT option. 2007-07-30 06:59:13 +00:00
ad
eb171eaaa7 It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
2007-07-29 12:50:17 +00:00
ad
b5a9ff06f1 Replace some uses of lockmgr(). 2007-07-21 19:51:47 +00:00
ad
88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
dsl
80f6eff58d Allow callers of the ATAIOCCOMMAND ioctl to request the WDCC_IDENTIFY to
specify a buffer that is less than 512 bytes.
2007-07-01 09:48:37 +00:00
dyoung
d424839018 Include opt_ata.h for ATADEBUG definition instead of #defining it
unconditionally.
2007-04-08 06:58:47 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
ad
b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +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
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
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
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
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
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
39cd836ee1 Use device_unit(). 2006-03-28 17:38:24 +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
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
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00