Commit Graph

490 Commits

Author SHA1 Message Date
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
briggs 8826927f06 ST3300831A also needs WD_QUIRK_FORCE_LBA48. 2005-08-26 00:09:03 +00:00
drochner e6a178f21f kill a number of autoconf submatch functions which follow the
standard scheme:
if (<configured> != <wildcard> && <configured> != <real>)
	then fail
else
	ask device match function

This is handled by config_stdsubmatch() now.
2005-08-25 22:33:18 +00:00
bouyer 6f6f287c39 Add a comment explaining why we have WD_QUIRK_FORCE_LBA48, instead of always
using LBA48 for sector 0xffffff.
2005-08-25 19:06:35 +00:00
drochner fa3cb84d62 replace the "locdesc_t" structure carrying the number of locators
explicitely by a plain integer array
the length in now known to all relevant parties, so this avoids
duplication of information, and we can allocate that thing in
drivers without hacks
2005-08-25 18:35:38 +00:00
drochner 2d0de57f09 remove unused (hopefully:-) softc fields for disk geometry 2005-07-25 12:52:44 +00:00
briggs 2622309630 Update array of software RAID names in ata_raid.c.
Change a boundary check to ensure that we won't accidentally read and use
uninitialized memory if ATA_RAID_TYPE_MAX is updated without updating the
array.
Update comment near ATA_RAID_TYPE_MAX to note that the array in ata_raid.c
should be updated if a new ATA_RAID_TYPE_* is added.
2005-07-18 15:21:48 +00:00
drochner a8dbed44ea tighten the autoconf constraints by passing the atapi/ata/ata_hl attribute
to config_found()
(after some cleanup we might be able to kill SCSIPI_BUSTYPE_*)
2005-07-07 17:51:31 +00:00
thorpej 527d62e0a2 - When starting an ATA or ATAPI transfer, handle the case where (*dma_init)()
returns EINVAL, indicating that DMA cannot be done for this transfer.
  Fall back to PIO in this case.
- Add a geodeide_dma_init() routine that checks to make sure that transfers
  start on a 16 byte boundary, returning EINVAL if not.  Works around a chip
  bug that causes a hard system hang.

Problem reported and patch tested by Erik Fair.
2005-07-06 01:46:52 +00:00
dsainty 867423adde Force LBA48 access to ST3160827AS drives. Without this change the entire
system hangs whenever a read or write request to sector 0xfffffff occurs.

The hang appears to happen when:

status = bus_space_read_1(wdr->cmd_iot, wdr->cmd_iohs[wd_status], 0);

is executed in __wdcwait(), and it is not possible to enter the debugger or
make the system respond at all after this point.

Whilst not necessarily the most prudent solution to handling the large number
of drives that exhibit this problem, it is currently the popular workaround.

[An alternative approach is to just always drop to LBA48 if the request
happens to pass by sector 0xfffffff and the drive reported as larger than
0xfffffff sectors.  My understanding is that the 32 bit addressing below
0x10000000 is purely there as a performance booster, not to resolve a
compatibility issue.]
2005-07-02 04:29:01 +00:00
briggs b0366b2ebd Basic support for RAID0 and RAID1 for the Adaptec HostRAID format as found
on the Intel 6300ESB on-board RAID.  Adapted from FreeBSD.
2005-06-20 02:11:57 +00:00
bouyer 19abf3be02 The ST3160023A* also need the LBA48 quirk. From Timo Schoeler. 2005-06-19 18:26:40 +00:00
bouyer 69baf4357d Use pmatch() metacharacters to match both SATA and PATA versions of seagate
drives in the quirk table.
2005-06-16 20:03:35 +00:00
martti ec63076a4b Added LBA48 quirk for Seagate ST3200822AS. Tested by Teemu Rinta-aho. 2005-06-16 05:47:17 +00:00
peter 130e3c23a2 Fix typos. 2005-06-07 13:45:11 +00:00
christos 9b1843d7c2 - remove casts [to avoid volatile]
- sprinkle const
- avoid shadowed variables
2005-05-29 22:11:28 +00:00
bouyer 633e533c5c Close a window where (disks) interrupts could be enabled while the
ATACH_TH_RUN flag is still set. Should fix panic reported by Jukka Salmi
on netbsd-users@.
2005-05-20 14:39:04 +00:00
bouyer eaa19a67b8 Add a ata_queue_idle() function, which freeze a queue and tsleep() until the
controller is idle.
Change the powerhook function to call ata_queue_idle() on standby/suspend,
and ata_reset_channel() on resume (to wake up the disks and start from a
clean state).
Fix PR kern/30194 by Lubomir Sedlacik.
2005-05-16 21:43:33 +00:00
bouyer 04f2acc1f3 Add another broken seagate device to the quirk list.
Problem reported by rudolf <netbsd at eq.cz> on netbsd-help@
2005-05-16 15:36:57 +00:00
drochner 10e5ded54b add definition for "security freeze" 2005-04-12 11:45:40 +00:00
matt 2d8931a849 Fix mode printing. (don't panic on unmatched devices) 2005-04-11 04:24:54 +00:00
yamt 99229e5d39 introduce a function to drain bufq and use it where appropriate. 2005-03-31 11:28:53 +00:00
tacha 357eb4e7e6 Disestablish powerhook while detaching atabus. 2005-03-04 11:00:54 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
jmcneill 3ab5a3900d Add powerhook for atabus. 2005-01-26 21:51:40 +00:00
bouyer c306ebdd4c Also call ata_dmaerr() on DMA errors (as reported by the underlying controller
driver). We want to downgrade to PIO mode if DMA isn't functionnal.
2005-01-16 20:17:37 +00:00